Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2012-04-26
帖子: 1
声望力: 0 ![]() |
![]()
以下简单的for循环结构:
clc for k=1:100 text=k for i=1:4 text1=i for j=1:4 text2=j text3=i end end end 按循环输出的顺序应该是:text=1 text1=1 text2=1 text3=1 text2=2 text3=1…… 但是,实际在matlab上运行时在Command Window上输出的顺序每次都不一样,抄录一次结果为例:text3=4 text=1 text1=1 text2=1 text3=1…… 想了好久没想明白,请多指教~~~ |
![]() |
![]() |