我需要帮助。基本上,我有一个大数据集,我已经分成块,现在,我需要单独打印块而不是打印整个块。
这是我的代码:
function f = printData()
data('FILE_NAME');
blockeddata = blocks(data, 600, 200);
f = blockeddata;
end
我只需要分别打印每个块。任何人的想法?
这是功能:
function f = blocks(v, N, M)
n = length(v);
maxblockstart = n - N + 1;
lastblockstart = maxblockstart - mod(maxblockstart-1 , M);
% numblocks = (lastblockstart-1)/M + 1
numblocks = (lastblockstart-1)/M + 1;
%f = zeros(numblocks,N);
for i = 1:numblocks
for j = 1:N
f(i,j) = v((i-1)*M+j);
end
end