drawing a 3D(mesh or surface) diagram in MATLAB

Status
Not open for further replies.

perado

Full Member level 2
Joined
May 28, 2010
Messages
127
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
2,134
hello, I have data like the photo that I attached and I want to draw a surface with this data in MATLAB , but I dont know how I should write the program in command window, please help me

 

A good start would be surf(my_matrix) command. Then you can go further by finding commands to modify axis labels, ticks and other properties.
 

Hi Perado

This is Simple you have an x axis and a y axis right
x = [val1 val2 etc..]
y = [val1 val2 etc..]

[X Y] = meshgrid(x,y)

Input_Matrix = [ row1 ; row2 ; etc..]

mesh(X,Y,Input_Matrix)

Thanks,
Omar
 
Reactions: perado

    perado

    Points: 2
    Helpful Answer Positive Rating
Hi Omar, thanks
your suggestion be very helpful but now I have a problem that is an error when I import the Input_Matrix from excel (beacuse I have data in excel format, a matrix with 36 column and 4000 row).
what I should do to troubleshoot??

 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…