![photo](/responsive_image/150/150/0/0/0/cache/matlabcentral/profiles/6672527_1522116701093_DEF.jpg)
Taylie Sargent
自 2015 起处于活动状态
Followers: 0 Following: 0
Feeds
提问
Modify the following program in order to have the same behavior but using vector operators instead of the while cycle
a = ceil(10*rand(1, 10)); index = 1; while index <= 10 if ceil(a(index)/2) == floor(a(index)/2) index = index + 1; ...
9 years 前 | 0 个回答 | 0
0
个回答提问
Modify the following program in order to get rid of the break statement without affecting the behavior of the program
a = rand(1, 10); index = 1; while index <= size(a, 2) if a(index) > .7 break end; a(index) index...
9 years 前 | 1 个回答 | 0
1
个回答提问
Write a Matlab program which gives the same output as the following program but only contains if statements
a = rand if a < .3 ’a < .3’ elseif a<.6 ’.3 <= a <.6’ else ’a > 6’ end;
9 years 前 | 0 个回答 | 0