append_array.m
来自「CheckMate is a MATLAB-based tool for mod」· M 代码 · 共 24 行
M
24 行
function A = append_array(A,B)
% Append a 1-dimensional `cell array` to another 1-dimensional cell array
%
% Syntax:
% "A = append_array(A,B)"
%
% Description:
% Appends the content of the 1-dimensional cell array "B" to the
% 1-dimensional cell array "A" and return the resulting cell array in the
% output variable.
%
% Example:
%
% * Suppose "A = {'a' 'b' 'c'}" and "B = {'d' 'e'}"
%
% * "append_array(A,B)" gives "{'a' 'b' 'c' 'd' 'e'}"
NA = length(A);
for k = 1:length(B)
A{NA+k} = B{k};
end
return
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?