Why is my GUI program producing an error when I 'Run' it?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
SampleEntropyのコードです。太字の部分、SampleEntropyが定義されていない、とエラーが出ます。どのように対処すればよいでしょうか?
%% SAMPLE ENTROPY
COP=COP';
%% Downsampling to 100 Hz (if Fs>100); see explanation in data analysis section of main paper
if Fs>100
Ratio = Fs/100;
COP_resample=resample(COP,1,Ratio);
else
COP_resample = COP;
end
%% Calculation of sample entropy of the anterior-posterior (y) and mediolateral (x) COP time series.
% Defining SEn parameters
m=3;
r=0.01;
%Calculating estimates and errors (latter are not used)
N_COP_x = (COP_resample(:,1)-(mean(COP_resample(:,1))))/var(COP_resample(:,1));
N_COP_y = (COP_resample(:,2)-(mean(COP_resample(:,2))))/var(COP_resample(:,2));
[SEN_x,err_x]=sampleEntropy(N_COP_x,m,r);
[SEN_y,err_y]=sampleEntropy(N_COP_y,m,r);
% SEn_total = SEN_total(length(SEN_total),1);
SEn_x = SEN_x(length(SEN_x),1);
SEn_y = SEN_y(length(SEN_y),1);
0 commentaires
Réponse acceptée
Kojiro Saito
le 7 Mar 2023
9 commentaires
Kojiro Saito
le 9 Mar 2023
コメントで記載したコードではaddpathはフォルダー名を指定しています。ファイル名ではなくフォルダー名を引数に入れるので
addpath('C:\Users\megan\OneDrive\デスクトップ\914\データ\1yama\cop\SampEn')
が正しいです。
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 線形代数 dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!