Error when multiplying two vectors

조회 수: 1 (최근 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 CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by