
Originally Posted by
smallpat
just wondering if anyone can help me
i want to use a while loop to obtain values and use those values to plot onto a graph. My actual work is more complicated but ill give a simple example so i can understand it.
clc
x = 0;
y = 1;
while x < 10 && y < 11
x = x + 1;
y = y +1;
end
for this bit of code is there any way that i can store each individual value of and x and y?? and then use this to plot a graph???
So basically the end output would be
X = [1, 2, ....10]
Y = [2, 3 .....11]
Cheers