extract the data from 3D struct matrix

조회 수: 8 (최근 30일)
mohammed hussein
mohammed hussein 2017년 11월 14일
댓글: mohammed hussein 2017년 11월 14일
Hi i have this matrix in name W attached . this matrix is struct matrix . each element is 1*3. i would like to extract only second number in data cell . for example in cell 1 i want only (3.966836777579012e-08 + 0.000000000000000e+00i) and so on .
thank you very much for helping

채택된 답변

KSSV
KSSV 2017년 11월 14일
YOu can extract what you want using:
Extract whole 1X3 matrix:
W(1).data
Extract third number:
W(1).data(3)
To extract whole data:
iwant = [W(:).data] ;
iwant = reshape(iwant,3,[])' ;

추가 답변 (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