A simple Question( i believe)
A simple Question( i believe)
(OP)
how can i do the matlab plot the resultant points at the same graphic.
for example( only to take a idea)
for x=1:10
y=x^2
end
when i put plot(x,y) the matlab plots only the last value calculated, but what i want is that it plots every points at the same graphic
TANKS
for example( only to take a idea)
for x=1:10
y=x^2
end
when i put plot(x,y) the matlab plots only the last value calculated, but what i want is that it plots every points at the same graphic
TANKS





RE: A simple Question( i believe)
y(x)=x^2
end
or better yet
x = 1 : 10;
y = x .^ 2;
This is called vectorization in the MATLAB community. It can remove the inner loop sometimes.