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
2018-4-10
Why do you expect that this function should exist? Have you donwloaded it from somewhere?
Antra Saxena
2018-4-10
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Bartlett 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!