Contour plot of polar coordinates

i have a 189*189 matrix which gives me a vector field in r and theta. I want a contour plot of that matrix. Any help would be greatly appreciated!

 Respuesta aceptada

Birdman
Birdman el 3 de En. de 2018
Try the following. I transformed the polar coordinates to cartesian coordinates and then obtained a contour polar plot.
load('theta.mat');
load('r.mat');
% Convert to Cartesian
x = r.*cos(theta);
y = r.*sin(theta);
z = r-theta;
h = polar(x,y);
hold on;
contourf(x,y,z);

2 comentarios

Yigit Ozbas
Yigit Ozbas el 3 de En. de 2018
I tried something similar and found my mistake and now it finally works. Thanks for your help.
Birdman
Birdman el 3 de En. de 2018
You're welcome.

Iniciar sesión para comentar.

Más respuestas (1)

Categorías

Más información sobre Contour Plots en Centro de ayuda y File Exchange.

Preguntada:

el 3 de En. de 2018

Respondida:

el 29 de En. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by