次のエラーが表示されます。
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 を使用しています。