What do the empty square brackets [] do in the expression executed by eval?
Show older comments
Accepted Answer
More Answers (1)
The same as they always do, concatenate whatever is inside the bracket. model must contain a char vector, so it just appends (0, [], [], 'compile') to whatever is in model.
A much better way of doing the same:
sys = feval(model, 0, [], [], 'compile');
don't use eval!
edit: completely misread the question. As Stephen explains, the brackets inside the call are used to tell the function called by eval to use the default value for that particular input.
Categories
Find more on Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!