MATLAB:用NaN替换单元阵列中的行/列

时间:2018-01-19 12:19:25

标签: matlab nan cell-array

我应该如何用NaN替换单元格数组中的完整行/列?

test = cell(3,2);

% These calls won't do it
test{2,:} = nan;
test(2,:) = nan;

1 个答案:

答案 0 :(得分:0)

test(2,:) = repmat({nan},1,2);