Matrix multiplication error arising
이전 댓글 표시
a = 12;
b = [1;2.5;6];
c=8;
d=(1:10)';
final = a./(b.*c.*d)
not able to get why theres an error arising
댓글 수: 1
These are not compatible sizes:
size(b)
size(d)
답변 (1개)
the cyclist
2021년 2월 7일
1 개 추천
Let's ignore the scalar values a and c, which do not cause any problem.
b is a 3x1 vector.
d is a 10x1 vector.
What do you expect to be the result of b.*d? They have a different number of elements, so the operation is ill-defined.
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!