Contour plot of polar coordinates
50 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
采纳的回答
Birdman
2018-1-3
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);
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Contour Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!