Incorrect Dimensions in Matrix Multiplication
14 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
David Hill
2020-3-3
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!