How do I get the live editor to not plot the same thing twice?
1 view (last 30 days)
Show older comments
I am using the MATLAB live editor and I have made a 2x5 plot showing the pole-zero maps and impulse response functions for several systems, as shown in the figure. I would then like to plot another function below it; the impulse of TF_feedback2. However, when I try to plot this latest figure, it plots the set of 2x5 plots again with the new function. Obviously i just want to have one plot there (actually I want a different set of 2x5, but reasoned that wont work if one figure wont work). How do I fix this?
Here is the image:
for i = 1:5
TF(i) = tf(N(i,:),D(i,:));
end
for i = 0:4
subplot('position', [(0.05 + i*.18) .6 .15 .25])
pzmap(TF(i+1))
xlim([-5,5])
if i ~= 0
xlabel(' ','Fontsize',0.01)
ylabel(' ','Fontsize',0.01)
title(' ','Fontsize',0.01)
else
xlabel(' ','Fontsize',10)
ylabel(' ','Fontsize',10)
end
end
for i = 0:4
subplot('position', [(0.05 + i*.18) .2 .15 .25])
impulse(TF(i+1), 0:0.01:4)
xlim([0,4])
if i ~= 0
xlabel(' ','Fontsize',0.01)
ylabel(' ','Fontsize',0.01)
title(' ','Fontsize',0.01)
else
xlabel(' ','Fontsize',10)
ylabel(' ','Fontsize',10)
end
end
%%%%%%%%%%%%%%%PROBLEM 3%%%%%%%%%%%%%%%
TF_feedback2 = feedback(TF(2),1);
impulse(TF_feedback2)
0 Comments
Accepted Answer
madhan ravi
on 25 Nov 2018
Edited: madhan ravi
on 25 Nov 2018
See section break
in live editor just divide the particular code by selecting it and click section break , later on you can just run the particular part of the code
2 Comments
madhan ravi
on 25 Nov 2018
Edited: madhan ravi
on 25 Nov 2018
If you could provide the datas , Could experiment to see why it’s happening
More Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!