Incorrect dimensions for matrix multiplication.
5 ビュー (過去 30 日間)
古いコメントを表示
((exp(x-4))*(x.^2)-x+1)/(2+cos(5*x))
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 '.*'.
Error in Trapezoidal (line 18)
y=((x.^2)*exp(x-4)-x+1)/(2+cos(5*x));
0 件のコメント
回答 (1 件)
David Hill
2020 年 7 月 21 日
y=((x.^2).*exp(x-4)-x+1)./(2+cos(5*x));%you likely want element-wise operations .* and ./
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!