%How would i form an array if i had 5 inputs like this of random number % displayed at the end. clc,clear x = 12; num = 0; for index = 1:5 y = input('Guess the number? ','s'); z = y + num; if z >= 13 disp(' Too High! ') elseif z <= 11 disp(' Too Low!') else; z = x; disp(' Correct! ') break end end
for index = 1:5 y = [0,0]; while numel(y)~=1 || mod(y,1)~=0 || y<0 y = input('Guess the number (scaler, positive integer)? ','s') end % [INSERT OTHER STUFF....] end
nLoops = 5; y = cell(1,nLoops); for index = 1:nLoops y{index} = [0,0]; while numel(y{index})~=1 || mod(y{index},1)~=0 || y{index}<0 y{index} = input('Guess the number (scaler, positive integer)? ','s'); end % [INSERT OTHER STUFF....] end
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.