Way to pass to a function a random variable based on array
Mostra commenti meno recenti
I have a list of variables in my workspace as a string array. I want to call a function to test every combo
Unfortunately when i run as it currently is it passes the string of the varialbe name and not the variable in my workspace. I have tried using the eval command however I can't have the eval command work in a parfor loop. Unfortunately without parfor it is very slow to test.
parfor i = 1:10
for j = i:10
testprocedure(VarArray(i,1),VarArray(j,1))
end
end
Risposta accettata
Più risposte (1)
Chris
il 23 Mar 2012
0 voti
Categorie
Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!