Hello sarah,
You are getting 80+ figures because you have used
in your for loop.
This instruction always opens a new figure in each iteration.
Remove this line of your code, then it will work well.
If the above code is the part of main program then use "figure" just above your for loop.
Now, it works well:
for i=0.0001:0.001:1
V1_iter= V1 - i;
error= (V1 - V1_iter)/V1;
plot(error,V1_iter,'r-*')
title('Graph of Iteration vs Error');
xlabel('Error');
ylabel('Iteration V1');
hold on;
if error == 0.001
end
drawnow;
end
0 Comments
Sign in to comment.