Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Help for creating a circular surface plot

Subject: Help for creating a circular surface plot

From: Camille Couzi

Date: 14 Feb, 2011 16:52:03

Message: 1 of 2

Hi everyone, I really nead some help for an issue.
I am working with energy spectra of wave measurements.
I have a matrix E wich is 48*90, as I have :
- 48 frequencies : 0.02:0.01:0.48
- and 90 directions: 0:4:356 (ÂșN)

I have already made my surf, contourf and imagesc plots, but now I need to make a directional plot.
I would like to plot a kind of surf, but based on a circular basis.
So I would have frequencies as rho, directions as theta, and my energy data would be the data I plot in the ciruclar basis.

I you want to have a image to can go to:

http://www.google.cl/imgres?imgurl=http://polar.ncep.noaa.gov/waves/latest_run/nww3.51001.spec.gif&imgrefurl=http://www.surforecasts.com/hawaii/&usg=__HWqOAxqIVIj0BcDFOyTJ9l83Qz0=&h=730&w=450&sz=106&hl=es&start=53&zoom=1&tbnid=_JXonWcWbP0e4M:&tbnh=166&tbnw=100&ei=Jl1ZTZ_qBpCltwflq7TuDA&prev=/images%3Fq%3Ddirectional%2Bspectra%26um%3D1%26hl%3Des%26sa%3DN%26biw%3D1920%26bih%3D866%26tbs%3Disch:10%2C1254&um=1&itbs=1&iact=hc&vpx=595&vpy=113&dur=693&hovh=286&hovw=176&tx=98&ty=127&oei=yFxZTdK4KNCftweW3rWmDQ&page=2&ndsp=34&ved=1t:429,r:27,s:53&biw=1920&bih=866

These are contour plots, I would like to get surface from that.

Dou you have any idea of how I can get that?
Thanks a lot in advance for your help.
Camille.

Subject: Help for creating a circular surface plot

From: Camille Couzi

Date: 15 Feb, 2011 13:34:04

Message: 2 of 2

Hi again,
I have solved part of my problem with that method:

[d,f]=meshgrid(deg2rad(x),y);
[X,Y]=pol2cart(d,f);
pcolor(X,Y,Z); %for circular contour plot
(or surfr(X,Y,Z); for circular surface plot)

but I get a plot without any ticks on the axis, and moreover, when I try to customise the datacursor, it is impossible to get the exact positions on the circle...
so I don't think this is a good solution.
Anybody has an idea?
thanks for the help!

Camille.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us