How to plot this exponential signal?

7 views (last 30 days)
Henri Urushihara
Henri Urushihara on 17 Sep 2021
Answered: Star Strider on 17 Sep 2021
I keep getting an error when I try to run this section of code in Matlab for signal generation.
It says "Error using *
Incorrect dimensions for matrix multiplication. Check that
the number of columns in the first matrix matches the
number of rows in the second matrix. To perform elementwise
multiplication, use '.*'."
Please help as this is for a lab. Thank you!

Answers (1)

Star Strider
Star Strider on 17 Sep 2021
The error message is spot on!
Use element-wise multiplication ...
↑ ← HERE
so with that correction ....
it should work correctly.
See Array vs. Matrix Operations for an extended discussion.




Community Treasure Hunt

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

Start Hunting!