need help in making good figure using surf and meshgrid
조회 수: 1 (최근 30일)
이전 댓글 표시
Here is my problem ! I am not able to get good figure out of it so please help !
I have error matrix 17 by 100. 17 is number % of missing sample from signal which varies from 5:5:85 (5 % to 85%). 100 is number of iteration.
so column 1 row 1 represents error vector for 5% missing samples..so my solution is getting converge in 3 values..same happens for 10%..in 15%...it converge say 5 values....when i say converge i mean that from 3rd value till 100 its all 0 in vector..
so iteration is 1:1:100 for all missingsamples..
Now i create
x=5:5:85;y=1:1:100; [X Y]=meshgrid(x,y); surf(X,Y,errormatrix)
Now since i have lot of zeros in my matrix i am not getting good figure..and second point which bothers me i just want to plot till point where it becomes 0 say i want to plot 3 iteration and 3 error values becoz 3 is 0..after that all are zero...
also is it possible to get the whole thing in middle it looks better, peaks look more better
ThANKS
댓글 수: 0
답변 (2개)
Andrew Newell
2011년 5월 15일
Did you try
imagesc(x,y,errormatrix)
as I suggested in your previous post? By choosing a suitable colormap and values for caxis, you could make the zero values white or a very light color. Another thing to try is hist3.
댓글 수: 0
Walter Roberson
2011년 5월 16일
Replace the 0's with nan:
errormatrix(errormatrix==0) = nan;
Then do the surf()
By the way, for any version of MATLAB released within the last several years, you can replace
x=5:5:85;y=1:1:100; [X Y]=meshgrid(x,y); surf(X,Y,errormatrix)
by
x=5:5:85;y=1:1:100; surf(x,y,errormatrix)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!