Polar Plotting of Data

4 views (last 30 days)
Amy Bredes
Amy Bredes on 12 Jan 2022
Answered: Bjorn Gustavsson on 12 Jan 2022
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

Answers (1)

Bjorn Gustavsson
Bjorn Gustavsson on 12 Jan 2022
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

Categories

Find more on Polar Plots in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!