Affichage des courbes en matlab
Résolu
qaszde
Messages postés
97
Date d'inscription
Statut
Membre
Dernière intervention
-
qaszde Messages postés 97 Date d'inscription Statut Membre Dernière intervention -
qaszde Messages postés 97 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
voici mon programme en matlab (calcul de nombre d'itérations pour la méthode de jacobi et gauss)
mon probléme est que à la fin de l'execution je veux avoir courbes ce qui ne se passe pas à la fin de l'execution de mon programme
pouvez vous m'indiquer la faute?
nitmax=2000;
mat=[];
mat_R=[];
JR_n=[];
GR_n=[];
JR_eps=[];
GR_eps=[];
JR_w=[];
GR_w=[];
for n=[50 100 200 300 400 500 ]
[A,b]=generation_A_b(n);
for eps=[10^-4 10^-5 10^-6 10^-7 10^-8 ]
i=Jacobi(A,b,n,eps,nitmax);
k=Gauss(A,b,n,eps,nitmax);
x=[n,eps,i,k];
mat=[mat;x];
for w=[0.5 0.6 0.8 1.0 1.2 1.6 1.8]
j=Jacobi_R(A,b,n,eps,w,nitmax);
g=Gauss_R(A,b,n,eps,w,nitmax);
xR=[n,eps,w,j,g];
mat_R=[mat_R;xR];
if (w==0.5 && eps==10^-4)
JR_n=[JR_n;j];
GR_n=[GR_n;g];
end;
if (w==0.5 && n==50)
JR_eps=[JR_eps;j];
GR_eps=[GR_eps;g];
end;
if(n==50 && eps== 10^-4)
JR_w=[JR_w;j];
GR_w=[GR_w;g];
end;
end;
end;
end;
mat
mat_R
JR_n
GR_n
JR_eps
GR_eps
JR_w
GR_w
plot(n,JR_n)
plot(n,GR_n)
plot(eps,JR_eps)
plot(eps,GR_eps)
plot(w,JR_w)
plot(w,GR_w)
voici mon programme en matlab (calcul de nombre d'itérations pour la méthode de jacobi et gauss)
mon probléme est que à la fin de l'execution je veux avoir courbes ce qui ne se passe pas à la fin de l'execution de mon programme
pouvez vous m'indiquer la faute?
nitmax=2000;
mat=[];
mat_R=[];
JR_n=[];
GR_n=[];
JR_eps=[];
GR_eps=[];
JR_w=[];
GR_w=[];
for n=[50 100 200 300 400 500 ]
[A,b]=generation_A_b(n);
for eps=[10^-4 10^-5 10^-6 10^-7 10^-8 ]
i=Jacobi(A,b,n,eps,nitmax);
k=Gauss(A,b,n,eps,nitmax);
x=[n,eps,i,k];
mat=[mat;x];
for w=[0.5 0.6 0.8 1.0 1.2 1.6 1.8]
j=Jacobi_R(A,b,n,eps,w,nitmax);
g=Gauss_R(A,b,n,eps,w,nitmax);
xR=[n,eps,w,j,g];
mat_R=[mat_R;xR];
if (w==0.5 && eps==10^-4)
JR_n=[JR_n;j];
GR_n=[GR_n;g];
end;
if (w==0.5 && n==50)
JR_eps=[JR_eps;j];
GR_eps=[GR_eps;g];
end;
if(n==50 && eps== 10^-4)
JR_w=[JR_w;j];
GR_w=[GR_w;g];
end;
end;
end;
end;
mat
mat_R
JR_n
GR_n
JR_eps
GR_eps
JR_w
GR_w
plot(n,JR_n)
plot(n,GR_n)
plot(eps,JR_eps)
plot(eps,GR_eps)
plot(w,JR_w)
plot(w,GR_w)
A voir également:
- Affichage des courbes en matlab
- Affichage double ecran - Guide
- Windows 11 affichage classique - Guide
- Problème affichage fenêtre windows 10 - Guide
- Affichage youtube trop grand ✓ - Forum YouTube
- Casio fx-92 affichage décimal ✓ - Forum calculatrices