-2

How am I supposed to replace a complete row/column within a cell array with NaNs?

test = cell(3,2);

% These calls won't do it
test{2,:} = nan;
test(2,:) = nan;
Andi
  • 3,196
  • 2
  • 24
  • 44

1 Answers1

0
test(2,:) = repmat({nan},1,2);
OmG
  • 18,337
  • 10
  • 57
  • 90
Andi
  • 3,196
  • 2
  • 24
  • 44