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!