正在加载图片...
迎 eg. 2.while循环 i=1 while i<10 while expression a(i)=i a=123456789] statementl i=i+l statement2 C=10 end c=i end eg:使用while循环计算f)=siny,x<5且每次x递增 In(x). x=0.1; f= while x<5 -4.0651e+002-1.5921e+003i f=sin(x) X= x=x+l0g(x) 5.5640+9.2717i end 77 2. while循环 while expression statement1 statement2 …… end eg: 使用while循环计算f(x)=sin(x) ,x<5且每次 x递增 ln(x) 。 x=0.1; while x<5 f=sin(x) x=x+log(x) end f = -4.0651e+002 -1.5921e+003i x = 5.5640 + 9.2717i eg. i=1 while i<10 a(i)=i i=i+1 end c=i a=[1 2 3 4 5 6 7 8 9] C=10
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有