i need to plot in 3d the freuquency domain of a gaussian pulse please someone tell me how to do it this is so far what i could do i did it in 2d but my purpose is in 3d???any one???

2 次查看(过去 30 天)
t=-10:0.1:10;
C=0;
t0=1;
T=t/t0;
A=1+(1i.*C);
fymax=1i;
B=T.^2;
ut=exp((-0.5.*A.*B)+(z*1i*exp(-A.*B)));
%-----figure 1--------------
plot(t,abs(ut))
xlabel('normalized time')
ylabel('spectral intensity')
% -----figure 2------------
figure
I=fftshift(fft(ut));
S=I.^2;
plot(abs(S))
xlabel('normalized frequency')
ylabel('spectral intensity')
%%%%
figure
z=-10:0.1:10;
dt = 0.1;
df = 1/(length(ut)*dt);
Fs = 1/dt;
f= -Fs/2+df:df:Fs/2;
for z=-Fs/2+df:df:Fs/2;
plot3(z,f,S)
z=z+1;
end
grid on
axis square
if true
% code
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by