How can i plot the Gaussian distribution PSF in 3D? I used the code PSF=fspeci​al('guassi​an',30,8); figure,imshow(PSF,[]) norm=normpdf(PSF,30,8); Y=[0:5:30]; Z=[0:5:30]; plot3(norm,Y,Z) On running code error says as Vectors must be same.

조회 수: 4 (최근 30일)
How can i plot the Gaussian distribution PSF in 3D?
I used the code
PSF=fspecial('guassian',30,8);
figure,imshow(PSF,[])
norm=normpdf(PSF,30,8);
Y=[0:5:30];
Z=[0:5:30];
plot3(norm,Y,Z)
On running code error says as Vectors must be same.

채택된 답변

Walter Roberson
Walter Roberson 2016년 9월 27일
I had to guess about what you were trying to do
Y = 1:30; Z = 1 : 30;
[y,z] = meshgrid(Y,Z);
surf(norm, y, z, 'edgecolor', 'none')
set(gca,'Ytick', 0:5:30, 'ZTick', 0:5:30)
Typically, though, people would be wanting to use the norm as the Z rather than the X.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by