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

2 次查看(过去 30 天)
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)

采纳的回答

madhan ravi
madhan ravi 2018-11-25
编辑:madhan ravi 2018-11-25
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 个评论
Mitch Hezel
Mitch Hezel 2018-11-25
Okay thank you, this does work, but do you know why it plots the same thing twice?
madhan ravi
madhan ravi 2018-11-25
编辑:madhan ravi 2018-11-25
If you could provide the datas , Could experiment to see why it’s happening

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by