Overlaying a small matrix to a large matrix, contour ploting, enlarging matrix
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
bym
am 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])
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Contour Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!