Error using get: Conversion to double from struct is not possible.

load C2049Dyn;
Cp = C2049Dyn.Blood.wTAC; Cp = [0 0 ; Cp];
Frame = get(C2049Dyn.Image, 'Frame');
clear C2049Dyn;
With my code above, I'm getting the error "Error using get, Conversion to double from struct is not possible." C2049Dyn is a 1x1 structure with 2 fields、Blood and Image. The field "Blood" is 1x1 structure containing 3 fields, including "wTAC". The field "Image" is a 1x1 structure containing 4 fields, including "Frame". "Frame" is double.
Please help me identify the problem with my code. Thanks.

답변 (1개)

Frame = C2049Dyn.Image.Frame;
or
Frame = getfield(C2049Dyn.Image, 'Frame');

카테고리

도움말 센터File Exchange에서 Import, Export, and Conversion에 대해 자세히 알아보기

태그

질문:

2016년 9월 26일

답변:

2016년 9월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by