# Sky plot in matlab

9 visualizaciones (últimos 30 días)
Swarnava Pramanik el 28 de Mzo. de 2015
Respondida: Anshuman el 19 de Ag. de 2024 a las 7:44
Hi, I'm trying to plot sky plot in Matlab. I have all the required data i.e azimuth angle and the elevation angle but I'm not able to plot it properly. My azimuth and elevation is in radians. I'm plotting polar(azimuth,elevation) but the desired plot is not coming. Can someone help me with this?
Thanks, Swarnava Pramanik
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Respuestas (1)

Anshuman el 19 de Ag. de 2024 a las 7:44
You can consider converting your angles from radians to degrees if needed, and ensure you are using the correct plotting function for your data. The 'polar' function is typically used for polar plots which might not directly give you a sky plot. Instead, you can use the 'polarplot' function for better control or convert to Cartesian coordinates for a more customized plot.
Here's how you can do it:
% Convert elevation to a form suitable for plotting
r = 90 - elevation_deg; % assuming elevation is from 0 (horizon) to 90 (zenith)
% Create the polar plot
ax = gca;
ax.ThetaZeroLocation = 'top'; % Set 0 degrees at the top
ax.ThetaDir = 'clockwise'; % Azimuth increases clockwise
ax.RDir = 'reverse'; % Reverse the radial direction
ax.RLim = [0 90]; % Limit the radial axis from 0 to 90 degrees
% Labels
title('Sky Plot');
You can adjust the code as needed based on your specific data and desired visualization.
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Categorías

Más información sobre Polar Plots en Help Center y File Exchange.

### Community Treasure Hunt

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

Start Hunting!

Translated by