Matlab
pseudo_matlab
Messages postés
3
Statut
Membre
-
Ponps123 Messages postés 26 Statut Membre -
Ponps123 Messages postés 26 Statut Membre -
Bonjour,
j'ai un problème de tracer un courbe sur matlab, il m'affiche une erreur
je veux tracer X_svg
avec t=0:300 (alors de dimension(1,301)) et Xsvg de dimension(3,10)
c'est quoi le problème?
??? Error using ==> plot
Vectors must be the same lengths.
Error in ==> k at 66
plot(t,X_svg(:),'g');
merci de me répondre :)
s'il vous plait
j'ai un problème de tracer un courbe sur matlab, il m'affiche une erreur
je veux tracer X_svg
avec t=0:300 (alors de dimension(1,301)) et Xsvg de dimension(3,10)
c'est quoi le problème?
??? Error using ==> plot
Vectors must be the same lengths.
Error in ==> k at 66
plot(t,X_svg(:),'g');
merci de me répondre :)
s'il vous plait
A voir également:
- Matlab
- Gnu octave matlab - Télécharger - Édition & Programmation
- Boucle for matlab - Forum Matlab
- Matlab vs maple - Forum Logiciels
- Comment sortir d'une boucle (matlab) - Forum Matlab
- TIPE à faire avec Matlab - Forum Matlab
1 réponse
Bonjour,
Alors pour faire simple, la fonction plot va prendre en x les points de t et en y ceux de X_svg.
Donc déjà ton X_svg à 3 dimensions donc Matlab essaiera de tracer 3 courbes...
Ensuite X_svg a 10 coordonnées y pour t qui en a 301. Il y a donc un problème de taille.
A quoi correspond ton X_svg ? 3 courbes ?
PS: Voici ce que help plot te donne...
If one of X or Y is a vector and the other is a matrix, then the matrix must have dimensions such that one of its dimensions equals the vector length. If the number of matrix rows equals the vector length, then MATLAB plots each matrix column versus the vector. If the number of matrix columns equals the vector length, then MATLAB plots each matrix row versus the vector. If the matrix is square, then MATLAB plots each column versus the vector.
Alors pour faire simple, la fonction plot va prendre en x les points de t et en y ceux de X_svg.
Donc déjà ton X_svg à 3 dimensions donc Matlab essaiera de tracer 3 courbes...
Ensuite X_svg a 10 coordonnées y pour t qui en a 301. Il y a donc un problème de taille.
A quoi correspond ton X_svg ? 3 courbes ?
PS: Voici ce que help plot te donne...
If one of X or Y is a vector and the other is a matrix, then the matrix must have dimensions such that one of its dimensions equals the vector length. If the number of matrix rows equals the vector length, then MATLAB plots each matrix column versus the vector. If the number of matrix columns equals the vector length, then MATLAB plots each matrix row versus the vector. If the matrix is square, then MATLAB plots each column versus the vector.