On this line
you defined f to be a function handle of an anonymous function with one input argument. Multiplication is not defined for function handles, only for numeric arrays**. If you want to multiply the output of that function (which will be a numeric array then you will need to call the function so that it returns that array.
Inside the loop you will need to call that function with one input argument, e.g.:
Note that your loop simply overwrites F on each iteration, only keeping F from the final iteration. I doubt that that is very useful.
** Well, also for logical and char.
Best Answer