I need to record the y-values of a line from x=a to x=b.
Each loop, the slope of the line will change so there will be a different set of x and y's for each loop
How can I record the y-values from the function for each loop? The above fix doesn't work if a function is inside of it. This is my code and gives me an error once it trys to record y(i):
x = 0:1:10;
y = ones(size(x)) ;
y(i) = x+rand;