How do i plot a radiation effiency plot using linestyle and colour style without using a loop, the below code return error each time i run it.
%% Plot a- MEASURED and SIMULATED E- plane radiation characteristics at 4.02GHz
figure()
P = polarpattern(MEASURED402data(:,2),'TitleBottom','(a) f=4.02 GHz', 'AngleDirection','cw',...
'AngleAtTop',0,'AngleResolution',30, 'MagnitudeLim' ,[-38 2],'ConnectEndpoints',[1],'LineStyleCyclingMethod', 'withcolor',ColorOrder', co);
hold on
P = polarpattern(SIMULATED402data(:,2));
hold off
legend('E-PLANE MEASURED', 'E - PLANE SIMULATED')

1 件のコメント

Walter Roberson
Walter Roberson 2023 年 8 月 31 日
What error shows up?
We do not have your data so we cannot run your code to see the error message.

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

 採用された回答

Walter Roberson
Walter Roberson 2023 年 8 月 31 日

0 投票

Once you start into name/value pairs, each name must have exactly one value parameter after it, and you cannot have any non-name/value pairs after the name/value pairs.
However you have
P = polarpattern(MEASURED402data(:,2),'TitleBottom','(a) f=4.02 GHz', 'AngleDirection','cw',...
'AngleAtTop',0,'AngleResolution',30, 'MagnitudeLim' ,[-38 2],'ConnectEndpoints',[1],'LineStyleCyclingMethod', 'withcolor',ColorOrder', co);
which has the option 'LineStyleCyclingMethod' followed by a value, and the nafter that you have the extra value that is the transpose of the non-existent variable named ColorOrder and then you have an extra value co after that.
... You probably wanted 'ColorOrder' instead of ColorOrder'

2 件のコメント

Elijah Joseph
Elijah Joseph 2023 年 8 月 31 日
Error in samplecode (line 20)
'AngleAtTop',0,'AngleResolution',30, 'MagnitudeLim' ,[-38 2],'ConnectEndpoints',[1],'LineStyleCyclingMethod',
'withcolor',ColorOrder', co);
Walter Roberson
Walter Roberson 2023 年 8 月 31 日
%% Plot a- MEASURED and SIMULATED E- plane radiation characteristics at 4.02GHz
figure()
P = polarpattern(MEASURED402data(:,2),'TitleBottom','(a) f=4.02 GHz', 'AngleDirection','cw',...
'AngleAtTop',0,'AngleResolution',30, 'MagnitudeLim' ,[-38 2],'ConnectEndpoints',[1],'LineStyleCyclingMethod', 'withcolor', 'ColorOrder', co);
hold on
P = polarpattern(SIMULATED402data(:,2));
hold off
legend('E-PLANE MEASURED', 'E - PLANE SIMULATED')

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by