Accessing the output individually
조회 수: 2 (최근 30일)
이전 댓글 표시
Dear All, could you please tell me, how can i access each element of the output result? for example, to get 16.6056 as output.
Thank you in advance.
>> logfile_P(1,1:25).time
ans =
16.6056
ans =
21.7406
ans =
26.8590
ans =
32.0106
ans =
37.1623
ans =
57.7857
ans =
62.9207
ans =
68.0890
ans =
73.2240
ans =
78.3590
ans =
140.1291
ans =
145.2807
ans =
150.4324
ans =
155.5674
ans =
160.7024
ans =
181.3091
ans =
186.4441
ans =
191.5958
ans =
196.7308
ans =
201.8825
ans =
263.6858
ans =
268.8042
ans =
273.9392
ans =
279.0575
ans =
284.1925
>> logfile_P
logfile_P =
1x50 struct array with fields:
trial
event_type
code
time
ttime
uncertainty
duration
uncertainty_1
reqtime
reqdur
stim_type
pair_index
댓글 수: 1
Stephen23
2015년 6월 30일
If you only want one element (e.g. 16.6056 as stated in the question), then just index into the structure:
logfile_P(1).time
채택된 답변
Sid
2015년 6월 30일
Perhaps try timeValues = [logfile_P.time] to make a vector and then extract timeValues(1:25) ?
댓글 수: 0
추가 답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!