MATLAB Answers

how i can plot graph?

1 view (last 30 days)
raphael costa barbosa
raphael costa barbosa on 6 Apr 2015
Edited: Wendy Fullam on 15 Apr 2015
how can i plot 3d graph?

  0 Comments

Sign in to comment.

Answers (4)

Stephen Cobeldick
Stephen Cobeldick on 6 Apr 2015
Edited: Stephen Cobeldick on 6 Apr 2015
There are lots of ways to plot in 3D. You could start by looking at plot3. You will find many 3D plottting functions here, sorted into categories:
If you want a 3D surface, you could try one of these:

  0 Comments

Sign in to comment.


Jan
Jan on 6 Apr 2015
There are many different types of 3D graphics. All of them are explained exhaustively in the documentation: http://www.mathworks.com/help/matlab/2-and-3d-plots.html

  0 Comments

Sign in to comment.


LUI PAUL
LUI PAUL on 6 Apr 2015
Edited: LUI PAUL on 6 Apr 2015
for 3D plots:
%1.general
A=[1 4 5 7;2 3 5 1]; B=[1 4 5 7;2 3 5 1]; C=[11 5 3 10;4 9 6 4]; plot3(A,B,C);
%2.Mesh Plot of Peaks
z=peaks(25); mesh(z); colormap(hsv)
%3.Surface Plot of Peaks
z=peaks(25); surf(z); colormap(jet)
%4.Surface Plot (with Shading) of Peaks
z=peaks(25); surfl(z); shading interp; colormap(pink);
%5.Contour Plot of Peaks
z=peaks(25); contour(z,16); colormap(hsv)
%.6Display a surfaceplot and contour plot of the peaks surface.
[X,Y,Z] = peaks(30); surfc(X,Y,Z) colormap hsv axis([-3 3 -3 3 -10 5])

  0 Comments

Sign in to comment.


Wendy Fullam
Wendy Fullam on 15 Apr 2015
Edited: Wendy Fullam on 15 Apr 2015
Here are some additional great examples using 3d graphics in MATLAB: Search for "3d" in MATLAB Examples:

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by