ux=@(x) ux1-((x/l)​*(3ux1+ux2​-4ux3))+((​x^2/l^2)*(​2*(ux1+ux2​-ux3))); ux=@(x) ux1-((x/l)​*(3ux1+ux2​-4ux3))+((​x^2/l^2)*(​2*(ux1+ux2​-ux3))); | Error: Unexpected MATLAB expression.

1 view (last 30 days)
For the above expression its says unexpected matlab expression
will anyone see this and correct my equation?

Answers (1)

Star Strider
Star Strider on 24 Oct 2014
MATLAB doesn’t allow variable names to begin with numbers.
That implies that you may be missing multiplication (*) operators, so that for instance 3ux1 should be 3*ux1, but since I have no idea what you’re doing, I can’t say for sure.

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!