Define a function_handle with array of variable dimension as an input

Hi everybody,
I've a probleme of unconstrained optimization and I would like to define the following function as a function_handle such that dimension is variable, for example:
where I wonder if it's possible or there is a another way to define F.
Thank You in advance for Your Help

2 Commenti

Doesn't look very difficult to do with a loop. What have you tried to do?
Yes I did, it works. But I used code suugested in first answer.

Accedi per commentare.

Prodotti

Release

R2022b

Richiesto:

il 10 Gen 2023

Commentato:

il 11 Gen 2023

Community Treasure Hunt

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

Start Hunting!

Translated by