필터 지우기
필터 지우기

Reference to non-existing field

조회 수: 1 (최근 30일)
Sam
Sam 2016년 3월 18일
답변: Adam 2016년 3월 18일
Hello,
I wrote a code but it gives the error "Reference to non-existing field 'Cycle'". All the fields I want to reference to, are named: Cycle1 Cycle2 Cycle3...
load('RefData.mat')
i = 0;
for i = 1:60
filename = 'Test_script';
xlrange = 'C(1+i):CY(1+i)';
xlswrite(filename,RefData.tasks.HTS.EntireCycle.angles.rawData.Cycle(i).LElbowProSupination,1,xlrange)
end
Any help?
Thanks!

답변 (1개)

Adam
Adam 2016년 3월 18일
Try this instead:
xlswrite(filename,RefData.tasks.HTS.EntireCycle.angles.rawData.( ['Cycle' num2str(i)] ).LElbowProSupination,1,xlrange)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by