Polar Plotting of Data

4 次查看(过去 30 天)
Amy Bredes
Amy Bredes 2022-1-12
Hi all,
I'm plotting something in polar coordinates for the first time and I need some help.
However I'm not sure how to prepare my data for a polar coordinate plot. I have data with one double with mangitudes and one column with the directions:
Mag = .3, .7, .12, .2,...etc
D = 120, 191, 130, 150,...etc
I understand how to create a plot more or less but I don't understand how to format my data from 'z'
Any help is appreciated! I've never created a mesh so I'm a little out of my depth

回答(1 个)

Bjorn Gustavsson
Bjorn Gustavsson 2022-1-12
The pcolor in polar coordinates is the polar version of pcolor. For those functions you will need some kind of 2-D surface-like data, Z that depends on x and y (for pcolor) or theta and r (for the polar version). If you have data that you can plot with pcolor, something like this:
pcolor(D,Mag,Z)
Then you can pretty much straightforward plot with the polarPcolor version as well:
polarPcolor(Mag,D,Z)
However, from the description of your data it seems to be a rather unsorted set of directions in a 1-D array, and that will have to be fixed first. Then you also do not describe what type of data you have for Z. Before you explain what type of data for Mag, D and Z you have further advice would be pure guesswork and a waste of time.
HTH

类别

Help CenterFile Exchange 中查找有关 Polar Plots 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by