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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Insufficient Initial Conditions

ptc-1386117
1-Visitor

Insufficient Initial Conditions

In this work sheet I get an error message that there are insufficient initial conditions. Can you help? Thanks, Richard

5 REPLIES 5
RichardJ
19-Tanzanite
(To:ptc-1386117)

Two problems. Your syntax was wrong for odesolve, and it does not like the function FF. I think you will have to use two solve blocks and determine afterwards which solution to use depending on your conditions.

Werner_E
25-Diamond I
(To:ptc-1386117)

Richard already pointed out the wrong syntax (its different for system of equations as opposed to a single ODE) and that MC does not like the function FF, as you pass the functions you want to solve for as arguments.

Nevertheless you may pass the function values instead of the functions themselves which makes it work.

1.png

RichardJ
19-Tanzanite
(To:Werner_E)

Nevertheless you may pass the function values instead of the function itself to make it work.

I didn't even think to try that. In fact, I would argue that it should not work. If the function has function names as arguments, then passing it values should throw an error.

Werner_E
25-Diamond I
(To:RichardJ)

Richard Jackson wrote:

Nevertheless you may pass the function values instead of the function itself to make it work.

I didn't even think to try that. In fact, I would argue that it should not work. If the function has function names as arguments, then passing it values should throw an error.

Of course I had to change the function FF, too, so the arguments are scalars now 🙂

The argument "t" is obsolete now, I just forgot to delete it.

0.png

RichardJ
19-Tanzanite
(To:Werner_E)

The argument "t" is obsolete now, I just forgot to delete it.

Ah. Sneaky. I think you didn't delete it just to catch me out

Announcements

Top Tags