0
我試過下面的代碼,但它不工作。我已經用我的輸入實現了移動窗口。現在我想將X_new重塑爲一維。將我的輸入從2維重塑爲1維
X = sixsignals;%input
T= output;%Ouptput
%moving data window
window_size = 20;
X_new = zeros(20, 6, size(X,2) - window_size + 1);
T_new = zeros(1, size(X,2) - window_size + 1);
for i = 1:(size(X,2) - window_size +1)
X_new(:,:,i) = X(:,i:i+19)';
T_new(i) = T(i+19);
end
你試過'X_new(:)'嗎? – EBH