Error when multiplying two vectors

1 Ansicht (letzte 30 Tage)
Lev Mihailov
Lev Mihailov am 10 Jul. 2019
Beantwortet: Andrei Bobrov am 10 Jul. 2019
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.

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 10 Jul. 2019
Use .* and ./:
Want=IWant.*lett+20./lett+1;

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by