Overlaying a small matrix to a large matrix, contour ploting, enlarging matrix
2 views (last 30 days)
Show older comments
I have three small matrices (32*32) of X and Y coordinates and corresponding Z values. If I simply make a contour plot, it is taking the spatial extent to the large valyes of X an Y (sayX=985, Y=895). However, I want to plot the Z values in a contour plot to the spatial extent of 1024*1024. How can I plot this? Also, can I replace the values of Z matrix (32*32) with corresponding to the X and Y values in the matrix (32*32) in matrix to a new matrix of 1024*1024 with zeros. Or can I enlarge the matrix Z (32*32) to new matrix of 1024*1024 filling with zeros? I have to maintain the coordinates or locations of Z values in the large new matrix. I hope I can make my question clear. Please help. Thanks a lot in advance.
0 Comments
Accepted Answer
bym
on 15 Aug 2011
maybe I don't understand, but is this what you are after
x = linspace(0,985,32);
[X,Y] = meshgrid(x,x);
Z = X.*Y+Y;
contour(X,Y,Z)
xlim([0,1024]),ylim([0,1024])
More Answers (0)
See Also
Categories
Find more on Contour Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!