Les fonctions dans matlab

253 mots 2 pages
Fonction sgn :
Function M.file : function y=signee(xi,xf,x,pas,d) n=[(xi+d):pas:(xf+d)]; xn=(x-xi)/pas; yg=-ones(1,xn); yc=ones(1,(xn+1)); x=[yg,yc]; plot(n,x); grid; end dans command window:
Signee (-10, 10, 0, 0.5, 0);
Axis ([-10 10 -2 2]);
Telle que: xi : position initial. xf : position final.
Pas : le pas. d : décalage.
Fonction échelon : function y=echlon(xi,xf,pas,d) n=[(xi+d):pas:(xf+d)]; xn=(0-xi)/pas; yg=zeros(1,xn); yc=ones(1,(xn+1)); x=[yg,yc]; plot(n,x); grid; end

Command window: echlon(-5,5,0.05,0,0);axis([-10 10 -1 2]);

Fonction sicnc(π x) :
Function M.file : function y=sinc(x) y=sin(pi.*x)/(pi.*x); end command window : fplot('sinc',[-4,4]) ;

fonction rect((tT) :
Function M.file : function y=rectt(xi,xf,x,pas,d) n=[(xi+d):pas:(xf+d)]; a=size(n); xn=(x-xi)/pas; yg=zeros(1,xn); yc=ones(1,(a(2)-2*xn)); x=[yg,yc,yg]; plot(n,x); grid; end exemple dans command window :

rectt(-5,5,-2,0.05,0); axis([-5 5 -1 1.5]);
Telle que : xi: position initial. (-5) xf: position final. (5)
Pas : le pas. (0.05) d : décalage(0).
Fonction rect(t-4T) :
Même fonction précédente
Exemple command window :
En prend d(decalage)=4 ; rectt(-5,5,-2,0.05,4); axis([-1 9 -1

en relation

  • Corrigé amérique nord nord
    3294 mots | 14 pages
  • Dm de math exponentielle
    599 mots | 3 pages
  • Spemath
    1333 mots | 6 pages
  • Réactivation des essentiels de 4eme
    1403 mots | 6 pages
  • Maths
    612 mots | 3 pages
  • Corrigé svt svt v corrigé
    14817 mots | 60 pages
  • Corrige Nlle Caledonie ES Mars 2015
    2296 mots | 10 pages
  • maths
    7488 mots | 30 pages
  • Cours de programmation l3
    7084 mots | 29 pages
  • Maths
    312 mots | 2 pages
  • E4R5
    883 mots | 4 pages
  • La clef des songes
    450 mots | 2 pages
  • la poésie
    443 mots | 2 pages
  • Vecteurs
    55026 mots | 221 pages
  • Dissertation
    1744 mots | 7 pages