Borrar filtros
Borrar filtros

Error using * Inner matrix dimensions must agree

1 visualización (últimos 30 días)
ding xian zhi
ding xian zhi el 19 de Mzo. de 2017
Editada: per isakson el 19 de Mzo. de 2017
y=cos(x).*[0.5+(3*sin(x))./(1+x*x)]
Error using *
Inner matrix dimensions must agree.
I want to know where is the problem could anyone help me thx

Respuesta aceptada

GEEVARGHESE TITUS
GEEVARGHESE TITUS el 19 de Mzo. de 2017
In the last part of the relation you are trying to do x*x, which is not possible. You should either use a dot operator or you need to transpose one of the x.
x=1:10;
y1=cos(x).*[0.5+(3*sin(x))./(1+x.*x)]
y2=cos(x).*[0.5+(3*sin(x))./(1+x*x')]

Más respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by