How to recover the Data (fields) from the Structure
조회 수: 1 (최근 30일)
이전 댓글 표시
I am running a glmfit model in a loop and I want to recover the data stored in a structure as fields. The model is:
for j=1:length(gnames) t = (n==gnames(j)); [beta(:,j),dev(:,j), stat(:,j)] = glmfit([x1(t) x2(t)],y(t,:),'gamma', 'link', 'reciprocal', 'const','on'); end
Several 'stat' structures are genereted and I want to recover all dispersion paramters stored in stat.sfit field and I am stack.
I also want to use glmval to get the intervals of y. Any practical help will be appreciated
댓글 수: 0
답변 (1개)
Sarah Wait Zaranek
2011년 4월 28일
allstats = [stat.sfit]
should save all the outputs in an array for you.
diff(yfit)
should give you the intervals of y (if I am understanding what you want), to get yfit - you use glmval as you mentioned above.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Text Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!