How do I get the live editor to not plot the same thing twice?

2 vues (au cours des 30 derniers jours)
Mitch Hezel
Mitch Hezel le 25 Nov 2018
Modifié(e) : madhan ravi le 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:
MP.PNG
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)

Réponse acceptée

madhan ravi
madhan ravi le 25 Nov 2018
Modifié(e) : madhan ravi le 25 Nov 2018
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 commentaires
Mitch Hezel
Mitch Hezel le 25 Nov 2018
Okay thank you, this does work, but do you know why it plots the same thing twice?
madhan ravi
madhan ravi le 25 Nov 2018
Modifié(e) : madhan ravi le 25 Nov 2018
If you could provide the datas , Could experiment to see why it’s happening

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by