Recursively build function handle and then solve

1 vue (au cours des 30 derniers jours)
Daria Nikitaeva
Daria Nikitaeva le 12 Juin 2020
Hello,
I need to build a function handle of n functions such as:
num_desired_functions=n
for i=1:n
fun{i}=@X some function of X(1)...X(n)
end
Now, I need to convert this cell array to a function handle of n functions that I will solve simultaneously with fsolve or lsqnonlin. Any ideas?

Réponses (1)

Walter Roberson
Walter Roberson le 12 Juin 2020
F = @(x) cellfun(@(f) f(x), fun) ;

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by