4
에 값을 추가 나는이 구조matlab에 : 초기화 중첩 된 구조체 셀
Data = struct('trials',{},'time',{},'theta_des',{},'vel_des',{},'trials_number',{},'sample_numbers',{});
Data(1).trials = cell(1,trials_number);
for i=1:trials_number
Data.trials{i} = struct('theta',{},'pos_err',{},'vel',{},'vel_err',{},'f_uparm',{},'f_forearm',{},'m_uparm',{},'m_forearm',{},...
'current',{},'total_current',{},'control_output',{},'feedback',{},'feedforward',{},'kp',{});
end
을 가지고 있지만 나는 ... 값
나는이 오류가Data.trials{i}.theta = 27;
를 추가 할 때
A dot name structure assignment is illegal when the structure is empty. Use a subscript on the structure.
해결 방법에 대한 아이디어가 있습니까?
감사합니다. 당신이 struct
의 문서를 살펴 경우
이것은 아름답게 작동합니다. 이것은 전체 인터넷에서 찾은 가장 좋은 답변입니다. 감사합니다. – gaborous
@gaborous oh gee. :). 고마워 ... 그리고 너는 천만 다. – rayryeng