我在matlab中进行在线数据采集存在以下问题。我想记录固定数量的4096个样本,进行计算并预测信号。我确实在线获取错误:
Attempted to access logData(:,32); index out of bounds because
size(logData)=[128,31].
Error in ==> SA_CONT at 23
normData(:,k45) = logData(:,k45)/norm(logData(:,k45),2);
Error in ==> SA_callback at 44
if(SA_CONT(data,plotHandle,SVM_RBF_model))
这里是错误!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[normData] = zeros(size(logData));
for k45 = 1:length(logData)
normData(:,k45) = logData(:,k45)/norm(logData(:,k45),2);
end
如果有人提出建议,那将是非常好的。如果你能为我提供代码会更好!
非常感谢!!
答案 0 :(得分:0)
将循环的条件更改为:
for k45 = 1:size(logData,2)