Why is my GUI program producing an error when I 'Run' it?
1 view (last 30 days)
Show older comments
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 Comments
Accepted Answer
Kojiro Saito
on 7 Mar 2023
9 Comments
Kojiro Saito
on 9 Mar 2023
コメントで記載したコードではaddpathはフォルダー名を指定しています。ファイル名ではなくフォルダー名を引数に入れるので
addpath('C:\Users\megan\OneDrive\デスクトップ\914\データ\1yama\cop\SampEn')
が正しいです。
More Answers (0)
See Also
Categories
Find more on Downloads in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!