フィルターのクリア

how concat two cell array?

2 ビュー (過去 30 日間)
fatemeh
fatemeh 2014 年 1 月 4 日
回答済み: Image Analyst 2014 年 1 月 4 日
i want to concatenate one variable cell array and one constant cell array like this: for cls=1:14
cl{1,cls}=ccl{1,cls}; cl{1,15}=out;
and the result be a cell array with 1 row and 15 columns

回答 (1 件)

Image Analyst
Image Analyst 2014 年 1 月 4 日
Did you try
% Create two sample cells.
ccl = {'abc'};
out = {'def'};
% Concatenate them. ccl goes into cell #1 of cl,
% and out goes into cells #2-15 of cl.
cl(1) = ccl(1);
cl(2:15) = repmat(out, [1, 14])

カテゴリ

Help Center および File ExchangeCell Arrays についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by