[regression] finished n-dim minimization
This commit is contained in:
@@ -72,13 +72,13 @@ x = [2:3:20]; % Some vector.
|
||||
y = []; % Empty vector for storing the results.
|
||||
for i=1:length(x)
|
||||
% The function get_something() returns a vector of unspecified size:
|
||||
z = get_somehow_more(x(i));
|
||||
z = get_something(x(i));
|
||||
% The content of z is appended to the result vector y:
|
||||
y = [y; z(:)];
|
||||
y = [y, z(:)];
|
||||
% The z(:) syntax ensures that we append column-vectors.
|
||||
end
|
||||
% Process the results stored in the vector z:
|
||||
mean(y)
|
||||
% Process the results stored in the vector y:
|
||||
mean(y, 1)
|
||||
\end{pagelisting}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user