Why does size(X, 100) return 1?
Show older comments
Here is a code snippet
X = data(:, 1:2); % X is a 2 x 3 matrix for example
disp(size(X, 1)); % displays 2
disp(size(X, 2)); % displays 3
disp(size(X, 5)); % displays 1
disp(size(X, 100)); % displays 1
Why does anything that exceeds the matrix bounds return a 1? Thanks.
Accepted Answer
More Answers (0)
Categories
Find more on Logical 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!