我收到一个错误:
b = cellfun(@(x) nansum(mag.*subsref(cross(u{1},x), struct('type', '()', 'subs', {':',':',3})) ),r,'UniformOutput',false);
??? Error using ==> subsref
The "subs" field for the subscript argument to SUBSREF and SUBSASGN must be a cell or character array.
Error in ==> cellcross>@(x)nansum(mag.*subsref(cross(u{1},x),struct('type','()','subs',{':',':',3}))) at 2
b = cellfun(@(x) nansum(mag.*subsref(cross(u{1},x), struct('type', '()', 'subs', {':',':',3})) ),r,'UniformOutput',false);
Error in ==> cellcross at 2
b = cellfun(@(x) nansum(mag.*subsref(cross(u{1},x), struct('type', '()', 'subs', {':',':',3})) ),r,'UniformOutput',false);
谁能告诉我为什么?
我正在使用 Matlab 2011。