Overlaying a small matrix to a large matrix, contour ploting, enlarging matrix
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
bym
2011-8-15
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])
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Contour Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!