vectorizing solution using fzero
Mostrar comentarios más antiguos
i have equations of the form f(x,X)=0; where X is a column vector of size N. i can solve using for example
f = @(xx) ( f(xx, X))
for i = 1:N
sol(i) = fzero( f(X(i)), [ 0 , 1000])
end
How I would like to eliminate the for loop. Is there a way? I would like something like sol = fzero(f(X), [0,1000]), however it gives an error if I try this. Thanks in advance.
Respuesta aceptada
Más respuestas (1)
Categorías
Más información sobre Direct Search en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!