Incorrect Dimensions in Matrix Multiplication
14 views (last 30 days)
Show older comments
Any help would be appreciated.
x = 0:0.05:3;
v = 1.062*10^-8*x.^(2)*exp(-2.81*10^-6*x.^2);
plot(x,v)
returns
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 '.*'.
0 Comments
Answers (1)
David Hill
on 3 Mar 2020
Missing a dot!
x = 0:0.05:3;
v = 1.062*10^-8*x.^(2).*exp(-2.81*10^-6*x.^2);
plot(x,v)
0 Comments
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!