Inserting functions in a vector function
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Silvio
el 6 de Jul. de 2022
Comentada: Silvio
el 6 de Jul. de 2022
Hello. I have a code with this kind of structure:
g=@(X) ... (complex operations with a function 'X')
f=@(x) x;
for n=1:N
f=@(x) g(f(x));
end
After updating the function's form but before going to the next step of the cicle, I would like to store the updated function in a vector which is still a function. That is, I would like to create something like this:
for n=1:N
f=@(x) g(f(x));
v(n)=@(x) f(x)
end
I know that the syntax above is not correct. I wonder if there is any method to do that kind of operation.
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Entering Commands en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!