I assign the command as follow:
[r,~]=size(alternative)
The problem I get: Unbalanced or unexpected parenthesis or bracket.
Anyone knows why? I have alternative size of 252x6
Thanks
You are running an old Matlab version (older than R2009b).
The use of ~
as unassigned to argument is relatively new feature to Matlab.
Use instead:
[r, ignore] = size( alternative );
See How to elegantly ignore some return values of a MATLAB function? on other methods to accomplish what you are trying.
PS,
Specifically for size
you can specify the dimension you are interested in as an input argument:
r = size( alternative, 1 ); % get only the number of rows