Matlab Tools for Multiple Instruction Single Data (MISD)?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello, I have a problem that has more than one million functions to evaluate, all different, for the same data group. Morphologically this type of problem is called MISD (Multiple Instructions Single Data), each mathematical function can be written as a matlab function, with input and output arguments. What is the most efficient way to solve this type of problems with matlab ?.
2 Kommentare
Antworten (1)
Walter Roberson
am 8 Mai 2017
global variables are the slowest kind of variables. You would be better to parameterize your functions
7 Kommentare
Walter Roberson
am 9 Mai 2017
If you have a vector of symbolic expressions, I would probably be tempted to factor() the length of the vector, reshape() with the last (largest) factor as the first dimension, then use matlabFunction on each column, asking to generate files. The purpose here is to batch enough work together to make it worth while to talk to a worker considering communications overhead.
If the expressions are to be reused multiple times, leave the default matlabFunction optimization on; otherwise, the optimization phase might be more expense than it is worth.
After that you can create workers, AddAttachedFiles, and parfeval() to invoke the functions on the current data.
Note: matlabFunction does not currently do well on vectors of functions where the components might require looping or piecewise(): in current implementations it tries put 'if' statements inside the horzcat or vertcat operator. matlabFunction also currently does not do well on int() with a vector of locations to be integrated.
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!