Fixed programming chapter
This commit is contained in:
@@ -6,4 +6,9 @@ size_of_a = size(a); % get the size and store it in a new variable
|
||||
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))
|
||||
fprintf('number of entries in the 2nd dimesion of a: %i\n', size_of_a(2))
|
||||
|
||||
%% Uebersichtliche Alternative?
|
||||
s = size(a); % Speicher den Rueckgabewert von size() in einer Variablen
|
||||
s(2) % Inhalt der zweiten Zahl, d.h. Laenge der 2. Dimension
|
||||
size(a,2) % Kurze Alternative
|
||||
|
||||
Reference in New Issue
Block a user