error unexpected matlab expression

Hi, can please help me, I key the equation in the code but it comes out error unexpected Matlab expression I don't what to do. can someone help me? thank you

 Respuesta aceptada

Star Strider
Star Strider el 12 de Ag. de 2017

0 votos

In MATLAB, the multiplication is the asterisk ‘*’, not a dot ‘.’.
If you want to do element-wise operations, use the dot operator with the multiplication operator ‘.*’, and with other operators to do element-wise division and exponentiation. The other expression, ‘x.y’ will be interpreted as referring to a structure, and will throw a different error if that structure does not appear in your workspace.
See the documentation on Getting Started (link) to understand the essentials of MATLAB programming, and Array vs. Matrix Operations (link) to understand the ‘dot operator’.

2 comentarios

Eugene  loh
Eugene loh el 12 de Ag. de 2017
Thank you
Star Strider
Star Strider el 12 de Ag. de 2017
My pleasure.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Function Creation en Centro de ayuda y File Exchange.

Preguntada:

el 12 de Ag. de 2017

Comentada:

el 12 de Ag. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by