Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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
Solved! Go to Solution.
Here's a simpler version than Stuart's, but uses Prime (actually Prime 2, but should be the same in 3.1):
Alan
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):
Alan
Thank you Alan for the feedback!
Domenico