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!