How to Turn Imagesc to x and y?
1 回表示 (過去 30 日間)
古いコメントを表示
I have the following file MunkS_500Hz.shd.mat,
munkProfile = load('MunkS_500Hz.shd.mat');
pressureWave = munkProfile.pressure;
pressureWave = abs(pressureWave);
squished = squeeze(pressureWave);
figure
plot(squished);
logged = log(squished)
imag = imagesc(logged);
that I can make into a 501 x 1001 matrix. Now I want to take this matrix from imagesc and put make it into a 3D point cloud. I would like some advice on how to do this. (I am unable to insert the file here even as a .zip file, I can email it to you if you think you can help).
0 件のコメント
回答 (2 件)
Rik
2020 年 2 月 19 日
編集済み: Rik
2020 年 2 月 19 日
You can generate the coordinates with ndgrid and then you can linearize the three matrices and use them as input to plot3.
I=randi(255,501,1001);
[X,Y]=ndgrid(1:size(I,1),1:size(I,2));
plot3(X(:),Y(:),I(:),'.')
(untested code)
5 件のコメント
Rik
2020 年 2 月 23 日
If you don't treat the pixel value as the z value, how are you using your data at all?
参考
カテゴリ
Help Center および File Exchange で Lighting, Transparency, and Shading についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!