📜  matlab 附加到向量 - Matlab 代码示例

📅  最后修改于: 2022-03-11 15:01:04.732000             🧑  作者: Mango

代码示例1
% 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]