Undefined function 'setPlotProp' for input arguments of type 'struct', why showing this error?

Hi,
I am getting error ,"Undefined function 'setPlotProp' for input arguments of type 'struct'".
I am attaching code below:
x=42.63;
y= tand(x)^2;
ZL_1=40;
ZL_2=60;
ZL_3=80;
ZL_4=100;
Zv=30:10:150;
Z1_1=(sqrt(ZL_1*[Zv.*(1+y)-ZL_1]))./tand(x);
Z1_2=(sqrt(ZL_2*[Zv.*(1+y)-ZL_2]))./tand(x);
Z1_3=(sqrt(ZL_3*[Zv.*(1+y)-ZL_3]))./tand(x);
Z1_4=(sqrt(ZL_4*[Zv.*(1+y)-ZL_4]))./tand(x);
plot(Zv, Z1_1);
hold on;
plot(Zv, Z1_2);
hold on;
plot(Zv, Z1_3);
hold on;
plot(Zv, Z1_4);
hold on;
opt = [];
opt.Colors = [
1, 0, 0;
0, 0, 1;
1 0, 1;
0, 1, 0;
];
opt.LineWidth = [2,2,2,2];
opt.XLabel = 'Z_V (\Omega)';
opt.YLabel = 'Z_1 (\Omega)';
opt.YLim = [30, 150];
opt.YTick = [30:10:150];
opt.AxisLineWidth=1;
opt.XLim = [30, 150];
opt.XTick = [30:10:150];
opt.Markers = {'o','^','s','d'};
opt.MarkerSpacing = [1, 2, 3, 4];
opt.Legend = {'Z_L=40 \Omega','Z_L=60 \Omega','Z_L=80 \Omega','Z_L=100 \Omega'};
opt.LegendLoc='best';
opt.LegendBox='off'
opt.BoxDim = [3,2];
opt.FontSize = 10;
opt.YGrid = 'off';
opt.XGrid = 'off';
opt.FileName = 'Virtual_Impedance_behavior.png';
setPlotProp(opt);
I am not able to resolve this error.
Thanks in advance

2 件のコメント

Adam
Adam 2018 年 4 月 10 日
Why do you expect that this function should exist? Have you donwloaded it from somewhere?
Antra Saxena
Antra Saxena 2018 年 4 月 10 日
No, I have not downloaded. Since, it is working code on one machine so I also tried on my machine.

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2018 年 4 月 9 日
編集済み: Walter Roberson 2018 年 4 月 10 日

0 投票

3 件のコメント

Antra Saxena
Antra Saxena 2018 年 4 月 10 日
Thank you for your answer, but its not working.
Walter Roberson
Walter Roberson 2018 年 4 月 10 日
You have to install that software and add it to your MATLAB path using pathtool
Antra Saxena
Antra Saxena 2018 年 4 月 10 日
Thank You so much.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by