Plotting Unequally Distributed Data

2 views (last 30 days)
Hi all,
I'm pretty sure this is easy, but I'm still absolute bollocks at Matlab. I have an 8x3 matrix M, containing the data that I want to make a surface plot of. I know that the 8 rows correspond to the values of 0,10,15,25,35,50,70,and 100. How do I get the xaxis to increase monotonically from 0-100 while still putting my data points at the correct point on it?
Thanks a lot, -Dave

Accepted Answer

Walter Roberson
Walter Roberson on 20 Jun 2012
xcoord = [0,10,15,25,35,50,70,100];
ycoord = 1:3;
surf(xcoord, ycoord, M)

More Answers (1)

Image Analyst
Image Analyst on 20 Jun 2012
And what direction is the x-axis? The vertical (rows) direction? Or the horizontal (columns) direction?
And what is the other axis (the column direction) doing? Does it just go from 1 to 3?
What do you want to happen in between the points, for example for a row value of 80? Do you want to interpolate with TriScatteredInterp() and plot with surf() or surface()? Or do you want "flat" panels in between the known data point locations?

Community Treasure Hunt

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

Start Hunting!