Unrecognized function or variable
la.mathworks.com › matlabcentral › answersJan 06, 2022 · When 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!