Error when multiplying two vectors

7 ビュー (過去 30 日間)
Lev Mihailov
Lev Mihailov 2019 年 7 月 10 日
回答済み: Andrei Bobrov 2019 年 7 月 10 日
Hello! I have two vectors of data that I need to multiply with each other and then podoleit
B = zeros(1,2);
IWant = [a B];
Want=IWant*lett+20/lett+1;
% 'a' dimensions 1x1101
% IWant 1x1103
% lett 1x1103
Error using *
Inner matrix dimensions must agree.

採用された回答

Andrei Bobrov
Andrei Bobrov 2019 年 7 月 10 日
Use .* and ./:
Want=IWant.*lett+20./lett+1;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by