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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Definition of solve block as function

dcavaiuolo
1-Newbie

Definition of solve block as function

Hi all,

I have been using  MathCad Prime 3.1 for some weeks: I recently implemented a solve block in which I defined a system of ODEs with guess values and initial conditions: the solution is calculated via "odesolve" function. Since I need to have the time and initial conditions as parameters, I was wondering how to define the solve block as a function, in order to recall it wherever within my worksheet.

Does anyone know how to do this?

Thanks a lot!

Domenico

1 ACCEPTED SOLUTION

Accepted Solutions

Here's a simpler version than Stuart's, but uses Prime (actually Prime 2, but should be the same in 3.1):

ode.PNG

Alan

View solution in original post

5 REPLIES 5

Domenico Cavaiuolo wrote:

Hi all,

I have been using  MathCad Prime 3.1 for some weeks: I recently implemented a solve block in which I defined a system of ODEs with guess values and initial conditions: the solution is calculated via "odesolve" function. Since I need to have the time and initial conditions as parameters, I was wondering how to define the solve block as a function, in order to recall it wherever within my worksheet.

Does anyone know how to do this?

I haven't got Prime available on my current PC, but I think the same thing as shown below should work in Prime 3.1.  Import the M15 worksheet to see if it does!  Essentially, you define another function (that takes the time and initial conditions as arguments) that executes the solve block, and then call that function to solve the ODE system.

Stuart

Perfect, it works! I chose Alan's anwers since it's more relevant to topic discussion on MathCad Prime .

Thank you for your feedback.

Domenico

Here's a simpler version than Stuart's, but uses Prime (actually Prime 2, but should be the same in 3.1):

ode.PNG

Alan

Thank you Alan for the feedback!

Domenico

Sorry.

Late but see an attach

Top Tags