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 Kommentar

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

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 31 Aug. 2023

0 Stimmen

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 Kommentare

Elijah Joseph
Elijah Joseph am 31 Aug. 2023
Error in samplecode (line 20)
'AngleAtTop',0,'AngleResolution',30, 'MagnitudeLim' ,[-38 2],'ConnectEndpoints',[1],'LineStyleCyclingMethod',
'withcolor',ColorOrder', co);
%% 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')

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by