plot (t,y) ,dimension failure
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
clear all; close all; clc;
delt=1/100;
t=0:delt:10;
y=exp(-t/2)*cos(t)
plot(t,y)
when I operate this code matlab program repeat me demension failure
y=exp(-t/2)*cos(t)
0 commentaires
Réponse acceptée
the cyclist
le 12 Avr 2021
Modifié(e) : the cyclist
le 12 Avr 2021
The answer is right there in the error message. Use elementwise multiplication instead of matrix multiplication.
clear all; close all; clc;
delt=1/100;
t=0:delt:10;
y=exp(-t/2).*cos(t);
plot(t,y)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Entering Commands dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!