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!