필터 지우기
필터 지우기

Saving and Loading ECG data (.mat)

조회 수: 15 (최근 30일)
Sarfaraz Ahmed
Sarfaraz Ahmed 2021년 4월 26일
댓글: Sarfaraz Ahmed 2021년 4월 27일
Hello. my query is when I load my ECG_Save variable, it does open saved ecg signal along with figure as well. I don't understand why figure open when I load ECG_Save variable ? I only want to see ECG_Save signal when I load it. it seems like figure also saved in ECG_Save data. how can I omit figure when I load data ?
I think I have some problem with this command in the below code : ECG_Save = ECG.Save;
The ECG code is :
while(ishandle(MainFigure_ECG))
ECGCrudeData = fscanf(Serialport, '%s');
ECG.Save(ECG.DataCursor) = str2double(ECGCrudeData);
end
save(['ECG_' datestr(now,30)]);
toc(For1sec)
close all
fclose(Serialport);
fclose(instrfind);
Anothe Script for loading and analyse ECG data: (here figue + ecg signal both shows -> I require only ecg signal here not figure)
load('ECG_20210426T224428.mat');
a=(ECG_Save(1,:));
figure;
plot(a);

채택된 답변

Walter Roberson
Walter Roberson 2021년 4월 26일
When you call save() and do not specify any variable names, then it will save all the variables in the current workspace. Including for example, the result of having called
MainFigure_ECG = figure(41);
You should avoid calling save() with no variable names, or else you should only do the save() from within a function that has a limited number of variables.
  댓글 수: 8
Walter Roberson
Walter Roberson 2021년 4월 27일
Interesting, I had not encountered that ability before.
Sarfaraz Ahmed
Sarfaraz Ahmed 2021년 4월 27일
Thank you for such assistance.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by