Sommaire


Sous Ubuntu (linux), pour copier une matrice de la fenêtre du terminal dans octave :

  • Il faut sélectionner le texte avec la souris dans le terminal
  • utiliser les touches ctrl shift c pour enregistrer le texte
  • Utiliser les touches ctrl v dans la fenêtre de octave.


Les commandes octave utilisées dans ce cours :
# --------------------------------
# Copy/Past into the octave window
#
 A=[
+2-1*i,-6+2*i,-7-6*i;
-6+6*i,+7+8*i,+9-7*i;
+9-9*i,-2+6*i,+1-6*i];
#
A_T = A'
#


# --------------------------------
# Copy/Past into the octave window
#
 A=[
+2-1*i,-6+2*i,-7-6*i;
-6+6*i,+7+8*i,+9-7*i;
+9-9*i,-2+6*i,+1-6*i];
#
traceA = trace(A)
#


# --------------------------------
# Copy/Past into the octave window
#
 A=[
+2-1*i,-6+2*i,-7-6*i;
-6+6*i,+7+8*i,+9-7*i;
+9-9*i,-2+6*i,+1-6*i];
#
sA = 100.*A
#


# --------------------------------
# Copy/Past into the octave window 
#
 A=[
+2-1*i,-6+2*i,-7-6*i;
-6+6*i,+7+8*i,+9-7*i;
+9-9*i,-2+6*i,+1-6*i];
#
 B=[
-7-1*i,-9-3*i,-5+6*i;
-3+4*i,+8-3*i,-1+6*i;
+4+4*i,-7-1*i,-9-9*i];
#
AB = A*B
AplusB = A+B
AminsB = A-B
#


# -------------------------------- 
# Copy/Past into the octave window
#
# A/B  = A*inv(B);
#
format short e;
#
 A=[
+2-1*i,-6+2*i,-7-6*i;
-6+6*i,+7+8*i,+9-7*i;
+9-9*i,-2+6*i,+1-6*i];
#
 B=[
-7-1*i,-9-3*i,-5+6*i;
-3+4*i,+8-3*i,-1+6*i;
+4+4*i,-7-1*i,-9-9*i];
#
AdivB = A/B
AinvB = A*inv(B)
#


# --------------------------------
# Copy/Past into the octave window 
#
 A=[
-0.170-0.853*i,-0.429-0.248*i,-0.412+0.651*i,+0.191-0.478*i;
+0.305+0.868*i,-0.174-0.711*i,+0.093-0.090*i,+0.824+0.531*i;
-0.102-0.812*i,-0.073-0.796*i,-0.858-0.861*i,-0.158+0.636*i;
-0.158+0.959*i,-0.897+0.138*i,+0.302-0.807*i,-0.553+0.557*i]
#
 expm (A)
#


# --------------------------------
# Copy/Past into the octave window 
#
 A=[
+2-1*i,-6+2*i,-7-6*i;
-6+6*i,+7+8*i,+9-7*i;
+9-9*i,-2+6*i,+1-6*i];
#
 det(A)
#


# --------------------------------
# Copy/Past into the octave window 
#
 B=[
+2-1*i,-6+2*i,-7-6*i;
-6+6*i,+7+8*i,+9-7*i;
+9-9*i,-2+6*i,+1-6*i];
#
format short e;
#
 inv(B)
#
 

# --------------------------------
# Copy/Past into the octave window 
#
 Ab=[
-194-129*i,-57+609*i,-77-659*i,-446+691*i,+771-502*i;
+797-623*i,-217+92*i,+482+547*i,+533-597*i,+8-690*i;
-616+647*i,+63+226*i,+197+114*i,+972-249*i,+331+564*i;
+402-363*i,-22-497*i,-970-448*i,+777+386*i,-327+510*i];
#
format short e;
#
 rref(Ab,.00000000001)
# 
 
# --------------------------------
# Copy/Past into the octave window 
#
 a=[
-7.0-1*i,-5.0-7*i,+6.0+4*i,-5.0+2*i;
-7.0-9*i,+4.0+8*i,-3.0-1*i,-3.0-9*i;
+8.0-5*i,-5.0+4*i,-3.0-5*i,-5.0-1*i;
-1.0-3*i,-3.0+6*i,+2.0+4*i,-1.0-7*i;
+4.0-5*i,+2.0-9*i,+6.0+6*i,-9.0-1*i;
-5.0-1*i,-9.0-5*i,-1.0-9*i,-3.0+6*i;
+2.0-7*i,-7.0-5*i,-9.0-3*i,-5.0-7*i];
#
format short e;
#
[Q, R] = qr (a,0) 
#
 
 
# --------------------------------
# Copy/Past into the octave window 
#
 a=[
+2-1*i,-6+2*i,-7-6*i;
-6+6*i,+7+8*i,+9-7*i;
+9-9*i,-2+6*i,+1-6*i];
#
format short e;
#
EigenValues  = eigs (a,10) 
#

 
# --------------------------------
# Copy/Past into the octave window  
#
 a=[
-7.0-1*i,-5.0-7*i,+6.0+4*i,-5.0+2*i;
-7.0-9*i,+4.0+8*i,-3.0-1*i,-3.0-9*i;
+8.0-5*i,-5.0+4*i,-3.0-5*i,-5.0-1*i;
-1.0-3*i,-3.0+6*i,+2.0+4*i,-1.0-7*i;
+4.0-5*i,+2.0-9*i,+6.0+6*i,-9.0-1*i;
-5.0-1*i,-9.0-5*i,-1.0-9*i,-3.0+6*i;
+2.0-7*i,-7.0-5*i,-9.0-3*i,-5.0-7*i];
#
format short e;
#
SvdValue = svd (a,10)
# 
 

# --------------------------------
# Copy/Past into the octave window 
#
 a=[
+2-1*i,-6+2*i,-7-6*i;
-6+6*i,+7+8*i,+9-7*i;
+9-9*i,-2+6*i,+1-6*i];
#
#
format short e
#
[V, E] = eigs (a,10) 
#
 

# --------------------------------
# Copy/Past into the octave window 
#
 B=[
-7-1*i,-9-3*i,-5+6*i,+6+8*i;
-3+4*i,+8-3*i,-1+6*i,+4-3*i;
+4+4*i,-7-1*i,-9-9*i,+2-5*i;
+8+8*i,-3-7*i,-3+2*i,+4-7*i];
#
format short e
#
 [U, S, V] =svd (B,10)
# 
 
# --------------------------------
# Copy/Past into the octave window 
#
 B=[
-7.0-1*i,-5.0-7*i,+6.0+4*i,-5.0+2*i;
-7.0-9*i,+4.0+8*i,-3.0-1*i,-3.0-9*i;
+8.0-5*i,-5.0+4*i,-3.0-5*i,-5.0-1*i;
-1.0-3*i,-3.0+6*i,+2.0+4*i,-1.0-7*i;
+4.0-5*i,+2.0-9*i,+6.0+6*i,-9.0-1*i;
-5.0-1*i,-9.0-5*i,-1.0-9*i,-3.0+6*i;
+2.0-7*i,-7.0-5*i,-9.0-3*i,-5.0-7*i];
#
format short e
#
pinv(B)
#