Fixed programming chapter

This commit is contained in:
2015-11-07 11:39:30 +01:00
parent 3417248f72
commit 4804946112
4 changed files with 100 additions and 108 deletions

View File

@@ -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