Effacer les filtres
Effacer les filtres

EMERGENCY Cannot plot "10,000*exp(-10000*t);"

1 vue (au cours des 30 derniers jours)
Michael Ferguson
Michael Ferguson le 12 Oct 2017
Commenté : Jan le 12 Oct 2017
t = linspace(0,0.001,100);
Impulse = 10,000*exp(-10000*t);
plot(t,Impulse,'r','LineWidth',3);
The plot comes up blank. Why?
  1 commentaire
Jan
Jan le 12 Oct 2017
EMERGENCY? Don't panic.

Connectez-vous pour commenter.

Réponse acceptée

James Tursa
James Tursa le 12 Oct 2017
Modifié(e) : James Tursa le 12 Oct 2017
Because you used a comma to define the 10000, and MATLAB sees that comma as a statement separator. MATLAB interprets this line
Impulse = 10,000*exp(-10000*t);
as two separate statements
Impulse = 10
000*exp(-10000*t);
Get rid of the comma.
Impulse = 10000*exp(-10000*t);

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by