Register to reply

3d plot in matlab

by cpeng
Tags: matlab, plot
Share this thread:
cpeng
#1
Feb17-09, 11:17 AM
P: 2
i want to plot these equations in 3d

Eq 1= 5x^2 - 2y^2 + 4x+ 4y -4 +2xy
Eq 2 =x^2 +3x +2y +xy +5
eq 3 = -7x2 +3x -6y +5xy +2

i tried plot3 with 3 matix of x,y,z but i am not satisfied with the result.
plz if any one know how to plot these equations.let me know
thanks in advance
Phys.Org News Partner Engineering news on Phys.org
Hoverbike drone project for air transport takes off
Student develops filter for clean water around the world
Developing the next evolution in underwater communication
Topher925
#2
Feb17-09, 04:43 PM
Topher925's Avatar
P: 1,672
What kind of plot are you trying to make? I'm going to assume a surface plot since you didn't specify. Here is an example using the "surf" command.

x = 1:1:100;
y = 1:1:100;
[X,Y] = meshgrid(x,y);
Z = X.^2.*Y.^3;
surf(X,Y,Z)
cpeng
#3
Feb18-09, 12:22 AM
P: 2
wel these 3 equations will represent 3 coordianted of plot(x,y,z)
combine plot of these equation. i have tried
ezsurf('-5*x.^2 - 2*y.^2 + 2*(x.*y) + 4*y + 4*x -4' ,'x.^2 +3*x +2*y +x*y +5 ','-7*x.^2 +3*x -6*y +5*(x.*y) +2 ');
thats work

pkmalik
#4
Jun26-09, 03:28 AM
P: 1
3d plot in matlab

Hi, I have 3 vectors of the same dimensions and want to plot a graph in 3D as surface or volume. I tried but I couldn't. Any body knows?
Vectors arr:
A=[2 5 15 25 30]
B=[0.1 0.2 0.5 0.9 1.0]
C=[1870 1890 1920 2000 2050]

thanks,
PK
pashasrp67
#5
Mar3-11, 05:13 AM
P: 3
Quote Quote by cpeng View Post
i want to plot these equations in 3d

Eq 1= 5x^2 - 2y^2 + 4x+ 4y -4 +2xy
Eq 2 =x^2 +3x +2y +xy +5
eq 3 = -7x2 +3x -6y +5xy +2

i tried plot3 with 3 matix of x,y,z but i am not satisfied with the result.
plz if any one know how to plot these equations.let me know
thanks in advance

for this one u can use this,

also mention the x and y values, ie starting and ending as x=1:10; y=1:10;

surf(x,y,Eq 1);
surf(x,y,Eq 2);
surf(x,y,Eq 3);
pashasrp67
#6
Mar3-11, 05:39 AM
P: 3
Quote Quote by pashasrp67 View Post
for this one u can use this,

also mention the x and y values, ie starting and ending as x=1:10; y=1:10;
figure;
surf(x,y,Eq 1);
surf(x,y,Eq 2);
surf(x,y,Eq 3);
hold on
so u can try with this
pashasrp67
#7
Mar3-11, 05:44 AM
P: 3
Quote Quote by pkmalik View Post
Hi, I have 3 vectors of the same dimensions and want to plot a graph in 3D as surface or volume. I tried but I couldn't. Any body knows?
Vectors arr:
A=[2 5 15 25 30]
B=[0.1 0.2 0.5 0.9 1.0]
C=[1870 1890 1920 2000 2050]

thanks,
PK
u can use plot3 function

as

plot3(A,B,C);


Register to reply

Related Discussions
Matlab: How to plot 'text' Math & Science Software 1
A simple plot animation in Matlab Math & Science Software 6
Plot System in Matlab Math & Science Software 1
Matlab z-transform Bode plot Math & Science Software 1
Simple plot in matlab Math & Science Software 0