cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

1-Newbie

Flood calculation - this value must be an array

Hi,again I am trying to solve differential equations with ODE solver. In defining the solver, there is always a message " the value must be an array".

Thanks

Krisnandito

1 ACCEPTED SOLUTION

Accepted Solutions
16-Pearl
(To:ptc-4501676)

You have a double vector on the LHS of odesolve. Mathcad thinks this is a vector with a single element (which just happens to be a vector). Replace this with a single vector.

However, you then get the same problem you had previously! Are you sure your test for negatives is the right way around this time? Certainly, if you reverse its logic the ODE works.

Alan

3 REPLIES 3
1-Newbie
(To:ptc-4501676)

There is typo in the equation in the previous file but still have "this value must be an array" message

16-Pearl
(To:ptc-4501676)

You have a double vector on the LHS of odesolve. Mathcad thinks this is a vector with a single element (which just happens to be a vector). Replace this with a single vector.

However, you then get the same problem you had previously! Are you sure your test for negatives is the right way around this time? Certainly, if you reverse its logic the ODE works.

Alan

1-Newbie
(To:AlanStevens)

Thanks Alan. Now the model works :-).

Krisnandito

Announcements