%Example of the data i have for one sateliite
elevation = [30; 60; 90];
azimuth = [60; 90; 120];
MP = [0.2; 0.7; 0.9];
figure()
skyplot(azimuth, elevation)
% How do i include MP to this skyplot in such a way that colour gradient represents the magintude of MP

2 Kommentare

Sarvesh Kale
Sarvesh Kale am 7 Mär. 2023
can you please tell what is MP ?
osasunmwen efosa
osasunmwen efosa am 7 Mär. 2023
MP is multipath. i want to be able to show the multipath for a particular elevation and azimuth angle. Considering the skyplot plot function only allows to plot 2 sets of data ( elevation and azimuth angle), i am unable to include a third one (multipath). Someone suggested that i introduce the multipath dataset as colour but i do not know how. Any suggestions or other options will be helpful.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Arka
Arka am 7 Mär. 2023

0 Stimmen

Hi,
I tried to implement what you wanted using polarplot instead of skyplot.
elevation = [30; 60; 90];
azimuth = [60; 90; 120];
MP = [0.2 0.7 0.9];
cmap = flipud(jet(256)); % color map from blue to red
min_MP = min(MP);
max_MP = max(MP);
c = interp1(linspace(min_MP, max_MP, size(cmap,1)), cmap, MP);
% plot each value pair individually using polarplot
figure;
for i = 1:length(elevation)
h = polarplot(deg2rad(azimuth(i)), elevation(i), 'o', 'MarkerSize', 10, 'MarkerFaceColor', c(i,:), 'MarkerEdgeColor', 'k');
hold on;
end
%skyplot(azimuth, elevation, MP, 'o', 'MarkerSize', 10, 'MarkerFaceColor', c, 'MarkerEdgeColor', 'k');
set(gca, 'ThetaZeroLocation', 'top', 'ThetaDir', 'clockwise', 'RTick', [0 30 60 90], 'GridColor', 'k', 'GridAlpha', 0.2);
Here, the closest satellite has the warmest colour. If you want the opposite colour coding, instead of cmap = flipud(jet(256));, do cmap = jet(256);
To learn more about polarplot, please go through the MathWorks documentation link below:

3 Kommentare

osasunmwen efosa
osasunmwen efosa am 7 Mär. 2023
thanks alot. Still some issues. In the original dataset, i have a couple of nans in all three datasets and this make this error ''Invalid RGB triplet. Specify a three-element vector of values between 0 and 1'' pops up when i try to plot. i can not change the nans to zeros because this will end up giving me the wrong results.
Arka
Arka am 8 Mär. 2023
You can try removing the corresponding data points containing NaNs from all 3 vectors.
osasunmwen efosa
osasunmwen efosa am 12 Mär. 2023
The colours tend to repeat after about four different colurs. The dataset i am trying to convert into colours has a length of 2880 and the variables are in the form of -0.005, 0.001, 0.056 and so on. the image below is what i got from your recommendation
this seems strange as i was expecting to see the range of different colours given on the colormap

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Version

R2022b

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by