所以我正在做教程,因为我是matlab的初学者。我用闪光装置记录了加速器数据,记录了9分钟的活动,然后将txt文件加载到matlab,获取功能,创建一个arff文件并探索混淆矩阵等(我将编辑txt文件,matlab产生并改变)它是arff文件。我已经成功得到了平均值但是现在我想要计算最小值然后是最大值(我正在分别做这个但是如果有人知道如何在一个脚本上完成所有这一切都很棒)
for i = 1:totalWindows
epMin = min(lowrow(startPos:endPos,:)); %calculate window min
%X, Y & Z axis values for each stat
lowrowminfeatures(i,1:3) = epMin;
%Next window position
startPos = endPos+1;
endPos = startPos + (windowLength * floor(Fq));
end
windowLength = 5; %Length for each window in seconds
startPos = 1; %Starting Position for 1st win
endPos = startPos + (windowLength * floor(Fq)); %End Position for 1st win
totalWindows = floor(length(fly)/Fq/windowLength);
stats = zeros(windowLength,9);
for i = 1:totalWindows
epMin = min(fly(startPos:endPos,:)); %calculate window min
%X, Y & Z axis values for each stat
flyminfeatures(i,1:3) = epMin;
%Next window position
startPos = endPos+1;
endPos = startPos + (windowLength * floor(Fq));
end
windowLength = 5; %Length for each window in seconds
startPos = 1; %Starting Position for 1st win
endPos = startPos + (windowLength * floor(Fq)); %End Position for 1st win
totalWindows = floor(length(pull)/Fq/windowLength);
stats = zeros(windowLength,9);
for i = 1:totalWindows
epMin = min(pull(startPos:endPos,:)); %calculate window min
%X, Y & Z axis values for each stat
pullminfeatures(i,1:3) = epMin;
%Next window position
startPos = endPos+1;
endPos = startPos + (windowLength * floor(Fq));
end
保存(' wekafilemin.txt',' lowrowminfeatures'' flyminfeatures'' pullminfeatures',' -ascii&# 39)
我如何获得wakefilemin来保存它,当我计算平均值时它现在不会用于最小值 - 当我运行这个m文件时,txt文件没有生成
文本文件应该是这样的:
非常感谢