Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Issue with vectors?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
How do I get this to work:
x = 0:.05:1;
y = exp(-2*x)*sin(x*10*pi);
It throws an error, but all I want it to do is give me an equivalent y matrix for my x matrix input. please help.
0 Kommentare
Antworten (1)
the cyclist
am 1 Nov. 2019
Bearbeitet: the cyclist
am 1 Nov. 2019
Sorry to be snarky, but did you trying reading the error message? It tells you what to do right there.
x = 0:.05:1;
y = exp(-2*x).*sin(x*10*pi);
Note where I used .* instead of just *. (It's not necessary to do that for every instance of *, because in the other places you are simply multiplying by a scalar.)
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!