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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Programming a ODE solution

nvsuryan
1-Newbie

Programming a ODE solution

I am trying to program a solution to an ODE but I get the message that no "givn found to solve this block". Please tell me where I have gone wrong. I am a beginner in programming. I have attached a file containing the program to solve an ODE. If this succeeds I have a more complicated program involving loops and if statements.

6 REPLIES 6

You can't use a solve block inside a program like you did!

In case your intention was to use con as an argument to your program - you can turn a solve block into a function, too. See attachment.

My question is can I have a solve block in a programming block. I have solved the ODE but I am trying an interative process to find the value of the constant with a program similar to the one I sent but has more for loops.

Narasipur Suryanarayana wrote:

My question is can I have a solve block in a programming block.

As already said - no. But you can turn the solve block into a function like I showed and call that function from within a program.

I have solved the ODE but I am trying an interative process to find the value of the constant with a program similar to the one I sent but has more for loops.

More loops? I havent seen a single loop in th program you sent. All your program would do is to solve the ODE and evaluate one of the function for argument 10.

Needs to be done as in the attached.

Alan

Mr. Werner Exinger answered my question and confirmed that a solve block cannot be used in programming. If I need to solve the ODE with different initial conditions is there any way that I can automate to computations?

Narasipur Suryanarayana wrote:

Mr. Werner Exinger answered my question and confirmed that a solve block cannot be used in programming. If I need to solve the ODE with different initial conditions is there any way that I can automate to computations?

Sure, and Alan and me, we have both shown how to do that in your sheets!

Top Tags