MATLAB: How can I improve the looping script

input and forloop

hey guys, im kind of new to matlab and practicing with code. This forloop only allow first input to be used with +4 iterations I want to allow user to choose 3 inputs into my forloop or if possible, how do I write the same while loop as well
a = input('Please choose 1st number','s');
for x = str2num(a):str2num(a)+4;
3*sqrt(25+10*sqrt(5).*(x.^2))
end

Best Answer

i=1; %while loop way
while i<5
%['Input number = ',num2str(i)]
a = input('Please choose number ')
value(i)=3*sqrt(25+10*sqrt(5).*((a).^2))
i =i+1;
end
---------------------------------------------
for i = 1:4 %for loop way
%['Input number = ',num2str(i)] %%just for recognition not necessary though
a = input('Please choose number ')
value(i)=3*sqrt(25+10*sqrt(5).*((a).^2))
end