Saving and Loading ECG data (.mat)
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sarfaraz Ahmed
el 26 de Abr. de 2021
Comentada: Sarfaraz Ahmed
el 27 de Abr. de 2021
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 comentarios
Respuesta aceptada
Walter Roberson
el 26 de Abr. de 2021
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Import and Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!