From: Jan Simon on 18 Feb 2010 11:05 Dear Andrew! > I am trying to figure out a way to replace values in a cell array with NaN. I can do it with a loop, but I have somehow got myself into the CELLFUN habit and don't much like the look of the loop: After some nice solutions have been found, could you be so kind and compare the execution speed with a simple loop? for iC = 1:numel(C) aC = C{iC}; aC(aC >= 0.5) = NaN; C{iC} = aC; end Although you don't "like" it, it could be more efficient. Jan PS. I do love the "comefrom" command even more than "goto" - but I'm not fond of the debugging hell these flow control methods yield to...
|
Pages: 1 Prev: Cognitive Radio MAC design Next: Low resolution in avi-files, why? |