how to incorporate the dataset in the form of struct?

1 visualización (últimos 30 días)
Muhammad
Muhammad el 2 de Sept. de 2021
Comentada: Walter Roberson el 2 de Sept. de 2021
Error in incorporatingdataset (line 24)
infileName =
dataset.(nfileName(i1)).(nmovName(i2)).(nrepName(i3)).(nfTime(i4)).(nsegName(i5)).(nrotName(i6));

Respuesta aceptada

Walter Roberson
Walter Roberson el 2 de Sept. de 2021
infileName = dataset.(nfileName{i1}).(nmovName{i2}).(nrepName{i3}).(nfTime{i4}).(nsegName{i5}).(nrotName{i6});
  2 comentarios
Muhammad
Muhammad el 2 de Sept. de 2021
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 el 2 de Sept. de 2021
dataset.(nfileName{i1}).(nmovName{i2}).(nrepName{i3}).(nfTime{i4}).([nsegName{i5} nrotName{i6}]);

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by