Extracting data from matlab struct

조회 수: 3 (최근 30일)
Ede gerlderlands
Ede gerlderlands 2012년 11월 18일
I have a data structure vector "A" = <1x24struct> that is 24sets long of these variable six fields:
br: 38.6890
br1: 234.2153
br2: 38.3359
br3: 232.9991
br4: 733857
date: 733976
How do I extract all the br values into one 1x24 vector?
I've used A.br(1:24) but can't work,
Thank you in advance for your help

채택된 답변

Walter Roberson
Walter Roberson 2012년 11월 18일
  댓글 수: 2
Walter Roberson
Walter Roberson 2012년 11월 18일
hortzcat(A.br)
provided that each br field is a row vector and that they are all the same length.
Note that this will not give you the 1x24 vector you asked for in the case when br has scalars: it would give you a 24x1 vector. Your requirements are contradictory, 1x24 vs 24xn .
Ede gerlderlands
Ede gerlderlands 2012년 11월 18일
Thanks........

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by