Saving and Loading ECG data (.mat)
15 次查看(过去 30 天)
显示 更早的评论
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);
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!