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:
How to plot 3D data?

Subject: How to plot 3D data?

From: Xiaochen

Date: 19 Aug, 2009 00:51:05

Message: 1 of 3

Hello everyone
I'm a greenhand with MATLAB.
Now I have a question.
I wanna plot a cube or sphere, any 3D shapes like that.
First I should create some 3D data, and then plot each 3D point in the 3D coordinate.
The more points, the better.
Maybe I should create matrices?
How could I do?
What commands I would probably use?

Subject: How to plot 3D data?

From: Gustavo Morales

Date: 19 Aug, 2009 03:21:04

Message: 2 of 3

Hi!

Do you know the equation of the figure you desire to plot? If you have a implicit function, of the form: f(x,y,z) = 0, you can use ezimplot3(), available in the File Exchange (FEX) and plot implicit functions.
Now, if you have some 3D point to point data, some commands you can use are:
patch()
surf()
mesh()
trimesh()

Subject: How to plot 3D data?

From: Xiaochen

Date: 20 Aug, 2009 04:22:18

Message: 3 of 3

"Gustavo Morales" <gustavo.morales.2000@gmail.com> wrote in message <h6fr30$jsc$1@fred.mathworks.com>...
> Hi!
>
> Do you know the equation of the figure you desire to plot? If you have a implicit function, of the form: f(x,y,z) = 0, you can use ezimplot3(), available in the File Exchange (FEX) and plot implicit functions.
> Now, if you have some 3D point to point data, some commands you can use are:
> patch()
> surf()
> mesh()
> trimesh()
Thank you very much for you replying! I'm so appreciate your support!

I don't have 3D data actually, I imagine if I have the figure function I can create hundreds and thousands of the 3D location data ,and the more data I use, the more accurate the figure would be!

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