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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by