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

2 views (last 30 days)
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,

Accepted Answer

Alan Weiss
Alan Weiss on 18 Jan 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

More Answers (0)

Community Treasure Hunt

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

Start Hunting!