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

Function not recognized in solve block

SM_10736402
2-Explorer

Function not recognized in solve block

Hi 

I am a new user and running into an issue.  I defined a variable outside the solve block and in the solve block set up odesolve with the function in the ODE.  However, I get an error in the solve block saying variable not recognized.  Please let me know what I am doing wrong.

3 REPLIES 3
LucMeekes
23-Emerald III
(To:SM_10736402)

You're doing two things wrong:

1. You should attach the Prime worksheet file.

2. You define your function aw(x) in terms of yw(x), at the top of the picture. yw(x) has an error, probably because it's undefined...

 

Success!
Luc

LucMeekes
23-Emerald III
(To:SM_10736402)

You have to write the constraints in terms of the function you are seeking to (Ode)solve. Consider this:

LucMeekes_5-1689887550664.png

LucMeekes_6-1689887558824.png

Does not work.

But this:

LucMeekes_7-1689887593829.png

can result in:

LucMeekes_8-1689887627084.png

Then your integral in the definition of Nw(x) uses yw as the integration variable. Is that intentional? Or do you even mean it to be yw(x)?

 

Success!
Luc

 

 

 

Werner_E
25-Diamond I
(To:LucMeekes)

Sometime with more complicated functions it may be convenient to split the expression into smaller parts using auxiliary functions like your cu(). It can be done with a differently defined function cu() which expects already the function value as its argument:

Werner_E_0-1689892194121.png

 

Announcements

Top Tags