Stop live editor show results in same window.
Show older comments
I have been using the live editor to create an script which shows several bode plots. The problem is its output always appear in the sides of the editor and i cannot find any importand stabiity margins from that output. when i use the bode command in Matlab Comman window, bode plot appears in a seperate window and i can analyse plot easily by right clicking the plots. It shows all the information when i ran thr bode command in Comman window. But when bode or bodeplot commands run in live editor script, it give just the image. Nothing can be analysed from that image. Why this is happenning. How i can open seperate window for bode or any other plots and show output elsewhare other than same window as the live editor.
Dont suggest the "open in figure window" as it just gives a figure with some xy numbers. No other data, no units no nothing.
Vg=24;
Vm=1.5;
V=12;
L=50e-6;
C=1e-3;
R=2.4;
Rc=0.18;
num=[C*Rc,1];
s = tf('s');
coeffS=(L/R)+C*Rc;
coeffSsq=L*C*(1+Rc/R);
den=[coeffSsq,coeffS,1];
buckSystem=tf(num,den);
buckSystem=buckSystem*(Vg/Vm);
UnCompansatedclosedLoop=feedback(buckSystem,1)
figure
bodeplot(buckSystem)
hold on
G=2.338837;
wl=2*pi*200;
num1=[1,wl];
den1=[1,0];
compensation=G*tf(num1,den1);
compansatedLoop=compensation*buckSystem;
bodeplot(compansatedLoop)
compansatedFeedback=feedback(compansatedLoop,1);
hold off
2 Comments
Dyuman Joshi
on 26 Apr 2023
I think Live Editor doesn't have the capability to open a seperate figure window as the MATLAB Application.
Máté
on 5 Sep 2025
This will force the figure window to appear separately.
set(gcf,'Visible','on')
If the figure has a handle ('hf' in the example below), that can be referenced too.
set(hf,'Visible','on')
Answers (1)
Cris LaPierre
on 26 Apr 2023
Update your figure command to use the following name-value pair:
figure('Visible','on')
Categories
Find more on Plot Customization 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!