Bonsoir,
ça fait quelque temps que je galère pour afficher une fonction. J'aimerais afficher le graphique de f(x)=10-20*2^-x*cos(2*pi*t-0.2*pi*x) où t est fixé. J'ai pondu le bout de code suivant (dans un fichier .m) :
Mais ça ne marche pas ... Voici l'erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 x=1:100; t=1; y=10-20*2^x.*cos(2*pi*t-0.2*pi*x); figure(1); plot(x,y); grid; xlabel('x'); ylabel('fonction(x)');
Pourriez-vous m'aider svp ? Merci d'avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 ??? Error using ==> mpower Matrix must be square. Error in ==> affichage_graph_tfixe at 8 y=10-20*2^x.*cos(2*pi*t-0.2*pi*x);
Partager