clear;clf;
// ******************
// variable ajustable
p=0.1; // pas
// ******************
// variables de base
x=[0:p:20*%pi]'; // x du sinus
N=size(x);
n=N(1,1); // nombre de points
s=1/p*(1:n); // fréquences
// nombres aleatoires, loi uniforme
y2=0.2*(rand(n,1)-0.5);
// ******************
// Calcul
y1=sin(x);
y3=y1+y2;
z1=abs(fft(y1))^2;
z2=abs(fft(y2))^2;
z3=abs(fft(y3))^2;
for i=1:n
if z1(i)>500 then z1(i)=500; end
if z3(i)>500 then z3(i)=500; end
end
// ******************
// affichage
subplot(3,2,1)
plot2d(x,y1,style=2,rect=[0,-1.1,60,1.1])
xtitle('signal sinusoïdal','Temps','Intensité')
subplot(3,2,2)
plot2d(s,z1,style=2,rect=[0,0,0.03,50])
xtitle('TF signal sinusoïdal','Fréq.','Puissance')
subplot(3,2,3)
plot2d(x,y2,style=2,rect=[0,-1.1,60,1.1])
xtitle('bruit','Temps','Intensité')
subplot(3,2,4)
plot2d(s,z2,style=2,rect=[0,0,0.03,50])
xtitle('TF bruit','Fréq.','Puissance')
subplot(3,2,5)
plot2d(x,y3,style=2,rect=[0,-1.1,60,1.1])
xtitle('signal sinusoïdal bruité','Temps','Intensité')
subplot(3,2,6)
plot2d(s,z3,style=2,rect=[0,0,0.03,50])
xtitle('TF signal sinusoïdal bruité','Fréq.','Puissance')
Licensing
I, the copyright holder of this work, hereby publish it under the following licenses:
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
This licensing tag was added to this file as part of the GFDL licensing update.http://creativecommons.org/licenses/by-sa/3.0/CC BY-SA 3.0Creative Commons Attribution-Share Alike 3.0truetrue
You may select the license of your choice.
Captions
Add a one-line explanation of what this file represents
Spectre (transformée de Fourier) d'un signal bruité ---- Spectrum (Fourier transform) of a signal with noise Auteur/author : Christophe Dang Ngoc Chan (user:cdang) Réalisé avec/made with Scilab
File usage
No pages on the English Wikipedia use this file (pages on other projects are not listed).