数学建模社区-数学中国's Archiver
论坛
›
MATLAB论坛
› 十行以内,你写过哪些比较酷的 Matlab 代码?
benLoveting
发表于 2015-4-8 19:47
十行以内,你写过哪些比较酷的 Matlab 代码?
十行以内,你写过哪些比较酷的 Matlab 代码?
韶华易逝去
发表于 2015-4-8 20:14
dimNum = 8;
hyperCube = reshape(0:10^dimNum-1, ones(1, dimNum)*10);
allCoord = repmat({1:9}, );
allCoord{end} = 2:9;
hyperCube = hyperCube(allCoord{:});
disp(sum(1./hyperCube(:)))
页:
[1]
查看完整版本:
十行以内,你写过哪些比较酷的 Matlab 代码?