Checking Conditions on Multiple-Variable Functions
Ältere Kommentare anzeigen
I have defined a few functions f1, f2, f3, f4, ... They depend on the same multiple variables x, y, z, u, v, ... Each of these variables are defined over a range of real numbers. From these ranges, I want to find a data set that satisfies various conditions such as f1 becomes minimum, f2 becomes maximum, f3 becomes a poisitve real number with no imaginary, f4 stays limited to a range, ...
I can write this code discretely by defining a grid matrix created by variables and then finding the values of all functions at all grid points and finally apply the conditions and selecting the dataset using indexing. But this method becomes extremely slow because to get accurate results, long variable points must be created that exponentially increase the number of grid points and memory.
Could you show me a code that does the job using functions? Are there options that can be applied to this code for faster and more accurate solutions?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!