I have an unordered array of size 3xN, and I want to plot a contourf plot of the data. When I try
contourf(pnts(1,:),pnts(2,:),pnts(3,:));
Matlab gives error. I can see that contourf
doesn't want 1xN arrays, it prefers matrices to draw. How can I rearrange my data so it can fit into contourf
? I don`t seem to achieve it.
I actually don't seem to get how should the data be ordered for contourf
. Any hint would be appreciated. My data can be similar to the one found in this post, but I dont know what shape will it have. Image of post:
My problem resides in not having a predefined shape. All the examples I found star with a meshgrid
of x and Y and then they get Z values, but my X and Y values can be named "bounded random". I know that they are not bigger than a size, but I dont know more about it.
EDIT data: http://pastebin.com/uUxJzttw You can directly copy-paste it into Matlab and it will be saved as variable.