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

3D graphs with 3 variables function as Z

Asked by Mustafa on 3 Dec 2011

Hello to all could someone please tell me how to plot a 3d graph with x and y as distances and z as function that depends on 3 variabls ?! example: ???(x2,y2,q(n,ja,ka)) = (x,y,z) Regards

0 Comments

Mustafa

Products

No products are associated with this question.

1 Answer

Answer by Naz on 3 Dec 2011
x=[1:10];
y=[1:10];
z=rand(1,10);
plot3(x,y,z)

2 Comments

Mustafa on 3 Dec 2011

it still doesn't accept z with more than 2 dimensions

Naz on 4 Dec 2011

I see. If your matrix z has size of XbyY, you can plot it as surf(x,y,z)

Naz

Contact us