how to incorporate the dataset in the form of struct?

1 回表示 (過去 30 日間)
Muhammad
Muhammad 2021 年 9 月 2 日
コメント済み: Walter Roberson 2021 年 9 月 2 日
Error in incorporatingdataset (line 24)
infileName =
dataset.(nfileName(i1)).(nmovName(i2)).(nrepName(i3)).(nfTime(i4)).(nsegName(i5)).(nrotName(i6));

採用された回答

Walter Roberson
Walter Roberson 2021 年 9 月 2 日
infileName = dataset.(nfileName{i1}).(nmovName{i2}).(nrepName{i3}).(nfTime{i4}).(nsegName{i5}).(nrotName{i6});
  2 件のコメント
Muhammad
Muhammad 2021 年 9 月 2 日
i have tried
clc
clear all
fileName= {'Mert'};
nameExt= {'dataset.'};
snameExt= string(nameExt);
nfileName= string(fileName);
load('dataset.mat')
for i1= 1:length(nfileName)
movName={'AOG'};%,'FUZ','FUZY','MaW','NoW','OAK'};
nmovName= string(movName);
for i2=1:length(nmovName)
repName={'Bir','iki','uc'};
nrepName= string(repName);
for i3=1:length(nrepName)
fTime={'TO'};%'TS'};
nfTime= string(fTime);
for i4=1:length(nfTime)
segName= {'L5S1','L3L4','T12L1','T8T9','C7T1','C1Head','RT4Shoulder','RShoulder','RElbow','RWrist','LT4Shoulder','LShoulder','LElbow','LWrist',...
'RHip','RKnee','RAnkle','RBallFoot','LHip','LKnee','LAnkle','LBallFoot'};
nsegName=string(segName);
for i5= 1:length(nsegName)
rotName={'_x','_y','_z'};
nrotName=string(rotName);
for i6=1:length(nrotName)
infileName = dataset.(nfileName{i1}).(nmovName{i2}).(nrepName{i3}).(nfTime{i4}).(nsegName{i5}).(nrotName{i6});
for k = 1: length(infileName)
x = linspace(0, 100, length((infileName)));
y = 1:100;
new_data = spline(x, [(infileName) y]);
normalized.(infileName(k))=(new_data(k));
end
end
end
end
end
end
end
error
Reference to non-existent field 'L5S1'.
Error in Untitled8 (line 25)
infileName =
dataset.(nfileName{i1}).(nmovName{i2}).(nrepName{i3}).(nfTime{i4}).(nsegName{i5}).(nrotName{i6});
Walter Roberson
Walter Roberson 2021 年 9 月 2 日
dataset.(nfileName{i1}).(nmovName{i2}).(nrepName{i3}).(nfTime{i4}).([nsegName{i5} nrotName{i6}]);

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by