Reputation: 129
When I run the below code, values of vf are printed in each iteration step. But after the code completely finished, when I type plot(vf) I get the error:
Unrecognized function or variable 'vf'.
Here is my code:
global Y
global vf
vf=[];
c=0;
for i=0:100:500
c=c+1;
%%this is a function by which I read the data for Y
readdata(i);
vf(cnt) = mean(mean(Y .* Y))
end
Could somebody please help me with solving this problem?
Upvotes: 1
Views: 36