GoalFind

Do the opposite of any single variable function or transformation
280 Downloads
Updated 1 Oct 2009

View License

Say you have a really nice function that transforms an input value into a output value. Now say you want to the opposite transformation. You can either go back and redo all of the math to reverse the transformation, or you can be lazy and use GoalFind. Here is a silly example sqrt(144) = 12. sqrt(?) = 10.

GoalFind('sqrt(N)',10,1000,2, 1, 1)

The arguments that go in are:
1. the formula ex. 'sqrt(N)'
2. the goal ex. 10
3. the maxium value you expect
4. the minimum value you expect
ex. I think the sqrt(?)=10 where ? is less than 1000 and greater than 2
5. how long in (seconds) can matlab work before you run out of patients
ex. 1 (work for a max of 1 second)
6. toggle printing the formula
ex. 1 will print to screen 'sqrt(100)=10' a 0 argument will print nothing.

Cite As

Keith Sudheimer (2024). GoalFind (https://www.mathworks.com/matlabcentral/fileexchange/25465-goalfind), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Startup and Shutdown in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0