It is not clear to me whether you want to minimize q_backup(k) for one particular value of k or for all k from 1 to 145.
Generally, you would have to pick one particular value of k, because optimization can minimize only a single scalar function. For example, if you can only lower q_backup(2) by raising the value of q_backup(1), then these are called "competing" objectives, and you cannot lower both at the same time.
So you need to decide what it is you are trying to do. Maybe you want to minimize the sum of squares of the vector q_backup:
fun = sum(q_backup^2); % Find the smallest mean square value
That is a scalar function and you can minimize it. You might want to try the Problem-Based Optimization Workflow. You will have to use the fcn2optimexpr function to wrap max and abs, as these are not supported operators for optimization variables.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation