do smithplot on uifigure
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Yulin Deng
am 23 Nov. 2019
Beantwortet: Janakinadh
am 12 Mai 2020
Hi,
I'm trying to create smithcharts, preferably like subplot side by side, in uifigure but received error:
![2019-11-22 20_43_52-X Window.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/249674/image.png)
Then I tried to do them in subplot by following an example from documentation page and it worked.
![2019-11-22 20_45_41-X Window.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/249675/image.png)
However, when I changed "plot" to "smithplot", I still received the same error as before.
Is there another way around to plot smith chart on uifigure? I have to use uifigure because I use it to contain other plots and measurements too.
Thanks!
0 Kommentare
Akzeptierte Antwort
Siriniharika Katukam
am 26 Nov. 2019
Hi,
I tried plotting smith charts using "smithplot” in uifigure in a function callback. This way also you can have subplots side by side.
subplot(211)
z = 0.1*50 + 1j*(0:0.1:50);
gamma = z2gamma(z);
smithplot(gamma);
subplot(212)
z = 0.1*50 + 1j*(0:0.1:50);
gamma = z2gamma(z);
smithplot(gamma);
0 Kommentare
Weitere Antworten (1)
Janakinadh
am 12 Mai 2020
Please use the below script (2020ad onwards)
a = uifigure;
g = uigridlayout(a);
g.RowHeight = {'1x'};
%%
Sa = sparameters('passive.s2p');
%%
panel1 = uipanel(g);
panel1.AutoResizeChildren = 'off';
s1 = smithplot(panel1);
add(s1,Sa.Frequencies,rfparam(Sa,1,1))
panel2 = uipanel(g);
panel2.AutoResizeChildren = 'off';
s2 = smithplot(panel2);
add(s2,Sa.Frequencies,rfparam(Sa,1,2))
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/292353/image.png)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Develop uifigure-Based Apps 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!