I wanted to convert anonymous function to a symbolic function.
I have something like
f = @(x)4*(3/4*pi-x(1))-7*x(3)
g = sym(f)
but I always get Index exceeds the number of array elements. Index must not exceed 1. How to fix this?
My x has usually size 8,1 but that shouldn't be relevant i guess Do I need to convert my x to sym as well or?