I need to graph a .mat file

조회 수: 1 (최근 30일)
Dodai Xenteltab
Dodai Xenteltab 2023년 5월 31일
답변: Diwakar Diwakar 2023년 5월 31일
I need to open and plot a .mat file.
I'm trying this:
x = load('female_1.mat');
figure; plot(x.data);
but an error hapen
Reference to non-existent field 'data'.
Any help?
  댓글 수: 1
Walter Roberson
Walter Roberson 2023년 5월 31일
Please show the output of
whos -file female_1.mat

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

답변 (1개)

Diwakar Diwakar
Diwakar Diwakar 2023년 5월 31일
The error you encountered suggests that the variable data does not exist in the loaded .mat file. The structure of the .mat file may be different from what you expected. To address this issue, you can examine the contents of the .mat file to determine the correct variable name to use.
Here's an example of how you can inspect the contents of the .mat file and find the appropriate variable name:
x = load('female_1.mat');
whos('-file', 'female_1.mat')

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by