# 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???

1 visualizzazione (ultimi 30 giorni)
abed il 7 Dic 2013
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 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by