Getting error : Unrecognized field name "array".

조회 수: 14 (최근 30일)
Neha Sinha
Neha Sinha 2023년 1월 16일
댓글: Steven Lord 2023년 1월 16일
Getting the below error. How to resolve it.

답변 (1개)

Steven Lord
Steven Lord 2023년 1월 16일
Does this command indicate that train.mat contains a variable named array?
whos -file train.mat % or whos('-file', 'train.mat')
Name Size Bytes Class Attributes Fs 1x1 8 double y 12880x1 103040 double
The train.mat file included in MATLAB does not.
which -all train.mat
/MATLAB/toolbox/matlab/audiovideo/train.mat
Did you expect array to refer to either the variable Fs or the variable y in the train.mat in MATLAB?
  댓글 수: 2
Neha Sinha
Neha Sinha 2023년 1월 16일
With array I wanted to read each row of the Train.mat file. How to read it?
Steven Lord
Steven Lord 2023년 1월 16일
ecg_signal = ecg.y(3, :)
But note if you later define ecg to be the data loaded from a different file, one that uses a different variable name, you'd need to use a different field name. The functionality described on this documentation page may be of use to you in that senario.

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

카테고리

Help CenterFile Exchange에서 Manage Products에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by