is it possible to plot three different dataset on a skyplot ? if yes, please how do i do this ? Because i am only able to plot elevation and azimuth on a skyplot
1 次查看(过去 30 天)
显示 更早的评论
% example of what my data looks like
PRN = 1;
gps_azi = azi(:,PRN,1);
gps_ele = new_ele(:,PRN,1);
L1_multipath = MP1(:,PRN) % this (multipath) is what i want to see on the skyplot with respect to elevation and azimuth angle where it occurs.
0 个评论
回答(1 个)
Kartik
2023-3-20
Hi,
Yes, it is possible to plot three different datasets on a skyplot in MATLAB. One way to do this is by using the scatter3 function, which allows you to plot points in 3D space.
Here's an example of how you could modify your code to plot the elevation, azimuth, and multipath data on a skyplot:
PRN = 1;
gps_azi = azi(:,PRN,1);
gps_ele = new_ele(:,PRN,1);
L1_multipath = MP1(:,PRN);
% Convert azimuth and elevation angles to cartesian coordinates
x = cosd(gps_azi).*cosd(gps_ele);
y = sind(gps_azi).*cosd(gps_ele);
z = sind(gps_ele);
% Create a scatter plot in 3D space
figure;
scatter3(x, y, z, 10, L1_multipath, 'filled');
colormap('jet');
colorbar;
% Set the axis labels and title
xlabel('X');
ylabel('Y');
zlabel('Z');
title('Skyplot with Multipath');
In this code, we first convert the azimuth and elevation angles to cartesian coordinates using the cosd() and sind() functions. We then use the scatter3() function to plot the points in 3D space, with the multipath data represented by the color of the points.
You can adjust the size of the points by changing the 10 value in the scatter3() function. You can also change the colormap used for the colorbar by replacing 'jet' with another colormap name.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Orange 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!