Polar Plotting of Data

조회 수: 3 (최근 30일)
Amy Bredes
Amy Bredes 2022년 1월 12일
답변: Bjorn Gustavsson 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