Equation variable depending
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Equation variable depending
Hi
I have a main equation formed by a sub equation with two variables of interest (AA and BB), plus a third (D) that can not be cleared, so I solve by iteration with the help of the Given and Find commands.
My question is whether it is possible to direct the main equation as a function of AA and BB, and according to the values that take these, calculate the variable "D" per iteration. Attached is an example for clarity of the problem I have and what I want to do.
Thank you
Solved! Go to Solution.
- Labels:
-
Other
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The trick is to turn the whole solve block into a function.
Maybe the attached file helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Much neater solution, I like it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Mike Armstrong wrote:
Much neater solution, I like it.
It doesn't matter much in case of this relatively simply equation. But with a more complex solve block it sure would matter if you call the solveblock function D() just once or six times for every single value of RESP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Werner Exinger wrote:
Mike Armstrong wrote:
Much neater solution, I like it.
It doesn't matter much in case of this relatively simply equation. But with a more complex solve block it sure would matter if you call the solveblock function D() just once or six times for every single value of RESP.
Good point. Even if this problem does not warrant optimisation, it is good practice to show it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Many thanks to Mike and WE for their unconditional support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Everything is fine when using the function, the problem occurs when I want to evaluate the function for a data matrix.
It is possible to assess the function "RESP" for a set of variables A1 and B1?
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Use vectorization.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you very much
