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!