How to transfer a function_handle vector to another function in matlab?
Mostrar comentarios más antiguos
% I know I can pass a function handle as a parameter directly to another function Like this form below
f(@func)
% Now I want to pass a one-dimensional function handle vector directly
% what is the best way for me to achieve this?
vector_func=[@func1,@func2,@func3]
f(vector_func)
%I've tried using cell to store function handles, but it throws an error
vec = cell(2);
cell(1) = @func %it will throw an error say cannot convert from function_handle to cell
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programming 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!