-
-
Save stivio00/1228227 to your computer and use it in GitHub Desktop.
Matlab stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function y = f(x,m) | |
% f esta funcion la funcion impulso rectangulo respresentado en sus serie | |
% de fourier y consta de M componentes, para llamar esta funcion f(x,m) | |
% donde x es el valor en la funcion y m el numero de componentes. | |
% Si quiere ver la funcion con sus cuatros componentes seria f(x,4) | |
% ejemplo, para graficar con 4 componentes: | |
% x = 0: .001 : 10; | |
% plot(x, f(x,4); | |
y = 0; | |
for i =1:m | |
y = y + 4/pi * (sin((2*i-1)*x)./(2*i-1)); | |
end | |
end | |
% un test para la consola en matlab | |
% >> x = 0:.001:10; | |
% >> for i = 1:5 | |
% >> figure | |
% >> plot(x,f(x,i)); | |
% >> end | |
%este test graficara diferentes graficas observando la convergencia de la | |
%serie |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment