How do I get the live editor to not plot the same thing twice?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mitch Hezel
am 25 Nov. 2018
Bearbeitet: madhan ravi
am 25 Nov. 2018
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 Kommentare
Akzeptierte Antwort
madhan ravi
am 25 Nov. 2018
Bearbeitet: madhan ravi
am 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 Kommentare
madhan ravi
am 25 Nov. 2018
Bearbeitet: madhan ravi
am 25 Nov. 2018
If you could provide the datas , Could experiment to see why it’s happening
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!