61
•
Petits rappels sur les commandes Matlab
Vérifiezencalculant :(>> a*x ,a *x-b)
Réessayez avec un autre second membre :
✞
☎
>> b=[1 10 ]’
>> x=a\b ,a *x ,a *x-b
✝
✆
On peut aussi résoudre le système linéaire ya=b’ par ( >>y=b’/a)
Bien sûr l’instruction ( >> y=b/a)donne un message d’erreur.
➤ D’autres fonctions matricielles
✞
☎
>> det(a), rank(a), inv(a), eig(a)
✝
✆
1.3 QUELQUES EXEMPLES ÉLÉMENTAIRES DE GRAPHIQUES
➤ Fonctions d’une variable réelle
✞
☎
>> x= -10: .001:10 ;
>> plot(x .^2)
>> figure
>> plot(x ,x .^2)
>> plot(x ,x .*sin(x) )
>> plot(x.*cos(x),x.*sin(x) )
>> comet(x.*cos(x),x.*sin(x) )
>> title(’c’’estjoli’);
✝
✆
➤ Fonctions de deux variables réelles
✞
☎
>> [x,y]=meshgrid([0:1:3],[1:0.5:2])
>> [x y]= meshgrid(-3:0.1:3,-4:0.2:5);
>> z=x.^2 +y .^2;
>> mesh(x,y,z)
>> surf(x,y,z)
>> xlabel(’x’)
>> contour(x,y,z)
✝
✆
•
Petits rappels sur les commandes Matlab
Vérifiezencalculant :(>> a*x ,a *x-b)
Réessayez avec un autre second membre :
✞
☎
>> b=[1 10 ]’
>> x=a\b ,a *x ,a *x-b
✝
✆
On peut aussi résoudre le système linéaire ya=b’ par ( >>y=b’/a)
Bien sûr l’instruction ( >> y=b/a)donne un message d’erreur.
➤ D’autres fonctions matricielles
✞
☎
>> det(a), rank(a), inv(a), eig(a)
✝
✆
1.3 QUELQUES EXEMPLES ÉLÉMENTAIRES DE GRAPHIQUES
➤ Fonctions d’une variable réelle
✞
☎
>> x= -10: .001:10 ;
>> plot(x .^2)
>> figure
>> plot(x ,x .^2)
>> plot(x ,x .*sin(x) )
>> plot(x.*cos(x),x.*sin(x) )
>> comet(x.*cos(x),x.*sin(x) )
>> title(’c’’estjoli’);
✝
✆
➤ Fonctions de deux variables réelles
✞
☎
>> [x,y]=meshgrid([0:1:3],[1:0.5:2])
>> [x y]= meshgrid(-3:0.1:3,-4:0.2:5);
>> z=x.^2 +y .^2;
>> mesh(x,y,z)
>> surf(x,y,z)
>> xlabel(’x’)
>> contour(x,y,z)
✝
✆
