I have a function in Matlab that finds the roots of a system of nonlinear equations. It calls for the system function, which is unique to each nonlinear system that I am trying to solve.(adsbygoogle = window.adsbygoogle || []).push({});

What I am trying to do is write a code that uses my root function to solve my system function. However, I also want the user to input the values of the constants in the system equations. If I write that in the system function, with each iteration that the root function does, I have to enter them again. That gets quite tiring.

I guess my question is, is there a trick to set the inputs of the systems function and have them used for every iteration in the root function?

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# How do I use the same user input for every iteration?

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - same user input | Date |
---|---|

Matlab User Specifying a Fit Function in a Separate File | May 30, 2017 |

LaTeX How to make font in subfigure of tikZ same size as document | Sep 6, 2016 |

Mathematica NDSolve different solutions same eq's | Jul 23, 2015 |

MATLAB-Plot two sets of data on the same graph with custom increments | Nov 19, 2013 |

[Matlab] Plotting two functions of the same variable against each other | Nov 15, 2012 |

**Physics Forums - The Fusion of Science and Community**