代码
Rm = corr(timeModel, 'Type', 'Spearman');
Rm
%First row of Rm contains the correlation coefficients between the values of avgExcTime and the expected execution times for all the possible values of KEY3:0
Rc = Rm(1,2:17);
%The entry of Rc with the highest positive value corresponds to the guessed
%key (the first entry of Rc is 1 and corresponds to the autocorrelation of
%avgExcTime, therefore is discarded)
[corr,idx] = max(Rc);
guessedKeyNibble = idx-1```
The error
位置 1 的索引无效。数组索引必须是正整数或逻辑值。
第 3 部分 (第 60 行) 出错 Rm = corr(timeModel, 'Type', 'Spearman'); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^```
有什么办法可以解决这个问题?TimeModel 的大小为 16 x 17,这是正确的,我真的不知道这里出了什么问题?