How to show mat file to struct ?

조회 수: 21 (최근 30일)
Chidiebere Ike
Chidiebere Ike 2019년 4월 26일
댓글: Star Strider 2019년 4월 27일
Hello, I wish to know how to show data in .mat file in the form struct and save it back to mat file format?

채택된 답변

Star Strider
Star Strider 2019년 4월 26일
If you load the .mat file to a variable, it will automatically be a structure:
Data = load('yourMatFile.mat');
You can then access the variables in the file as:
x = Data.Variable1;
y = Data.Variable2;
and so forth, depending on the variable names in the .mat file.
See the documentation section on: Load List of Variables Into Structure Array (link) for an extended discussion.
  댓글 수: 4
Chidiebere Ike
Chidiebere Ike 2019년 4월 27일
Thanks, I appreciate
Star Strider
Star Strider 2019년 4월 27일
As always, my pleasure.

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

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