Error in writing c-coefficient as a function of unknown solution u

Why I got error after writing this c-coefficient? I got error pointing at my u=parabolic() c='(por^3*(1-ct*(u-u0))^3)/(5*S^2*(1-(por*(1-ct*(u-u0))))^2)';
Even if I use the period for the multiplication I still got error.
Please help and thank you,

1 comentario

I meant error after c='(por^3*(1-ct*(u-u0))^3)/(5*S^2*(1-(por*(1-ct*(u-u0))))^2)';

Iniciar sesión para comentar.

 Respuesta aceptada

Alan Weiss
Alan Weiss el 18 de En. de 2016
As the documentation states, Use .*, ./, and .^ for multiplication, division, and exponentiation operations. The text expressions operate on row vectors, so the operations must make sense for row vectors. This means you need to use .^3 and similar for exponentiation.
If you want more help then I strongly suggest that you give us more information. Specifically, which MATLAB version are you running? What is the exact and full error message that MATLAB throws? What is the exact and full function call?
Alan Weiss
MATLAB mathematical toolbox documentation

Más respuestas (0)

Preguntada:

el 15 de En. de 2016

Comentada:

el 28 de En. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by