Evaluate MATLAB expression - MATLAB eval
https://www.mathworks.com/help/matlab/ref/eval.htmlTo allow the MATLAB parser to perform stricter checks on your code and avoid untrapped errors and other unexpected behaviors, do not include output arguments in the input to the eval function. For example, the statement eval(['output = ',expression]) is not recommended. Instead, specify output arguments to the eval function to store the results of the evaluated expression.