필터 지우기
필터 지우기

How to use data in a structure

조회 수: 2 (최근 30일)
James
James 2014년 4월 10일
편집: Azzi Abdelmalek 2014년 4월 10일
Hi,
I used the following code A=importdata('filename'). This worked out great and gave me the data from the file in a structure "A". The structure has a matrix "data" and an array "txt" in it. How do I use that matrix / aray later in the script? I tried to set B=data and C=txt but it gave me the error of unknown variables.
Thanks

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 4월 10일
편집: Azzi Abdelmalek 2014년 4월 10일
If your struct variable is A
B=A.data
C=A.textdata

추가 답변 (1개)

Alberto
Alberto 2014년 4월 10일
If all your data is inside the structure A, you should call data and txt like this:
B=A.data
C=A.txt

카테고리

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