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 件)

the cyclist
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 ExchangeProgramming についてさらに検索

製品

リリース

R2019a

質問済み:

2021 年 2 月 7 日

コメント済み:

2021 年 2 月 7 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by