Horje
matlab append to vector Code Example
[Solved] - matlab append to vector Code Example
Try following codes
matlab append to vector
% Direct indexing:
x = [1 2 3]
x(4) = 4

% Direct indexing other method:
x(end+1) = 4;	% Note that end is a keyword and you do not need a variable called end

% Concatination
x = [x newval]

% Concatination other method
x = [x, newval]

% Concatination column vector
x = [x; newval]
Date: 2022-05-21 05:02:10
Category: matlab
More for You