I wrote the following code
no_of_values=input('How many Values of the independant valriable (x) are there'); for i=0:1:no_of_values-1 x_i=input(['Enter the value of x_ ',num2str(i)]); y_i=input(['Enter the value of y_ ',num2str(i)]); endI want to save the value of x_i and y_i after every iteration, like x_0 and x_1 etc. But when the loop ends Matlab only remembers x_i and y_i asvariables for the last values. The error can be seen in the screenshot attached
Best Answer