Error when multiplying two vectors

1 visualización (últimos 30 días)
Lev Mihailov
Lev Mihailov el 10 de Jul. de 2019
Respondida: Andrei Bobrov el 10 de Jul. de 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.

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by