Unrecognized function or variable
it.mathworks.com › matlabcentral › answersWhen I try to do that matlab gives me the following error: Unrecognized function or variable 'index'. I do this as part of an optimization program using fmincon where Ti Tf and beta are the optimized variables. I have attached my code below (t is the integration time given by ODE45). Thanks to anyone who can help me!