9 lines
382 B
Matlab
9 lines
382 B
Matlab
a = (11:20); % a vector with 10 Elements
|
|
fprintf('length of a: %i\n', length(a))
|
|
size_of_a = size(a); % get the size and store it in a new variable
|
|
|
|
% size_of_a is a vector itself
|
|
fprintf('number of dimensions (rank) of size_of_a: %i\n', length(size_of_a))
|
|
|
|
% get the value of the second element of size_of_a
|
|
fprintf('number of entries in the 2nd dimesion of a: %i\n', size_of_a(2)) |