On Thursday, October 3, 2013 2:36:07 PM UTC+13, Ooi Chip Pin wrote: > "Steven Lord" <Steven_Lord@mathworks.com> wrote in message <email@example.com>... > > > > > > "Ooi Chip Pin" <firstname.lastname@example.org> wrote in message > > > news:email@example.com... > > > > Hi All, > > > > > > > > Need some helps regarding the .mat file from Physionet. > > > > http://www.physionet.org/cgi-bin/atm/ATM > > > > > > > > From the link above, I exported the MIT-BIH Arrhythmia Database (mitdb) > > > > output with .mat format and download the .mat into my directory. The > > > > problem is i failed to load the .mat file into matlab and plot it. > > > > > > Please clarify what happened when you tried to LOAD the MAT-file. Show the > > > code you used to LOAD it and state whether it threw an error (and include > > > the FULL text of the error message), issued a warning (again, include the > > > full text), read the data in incorrectly, etc. > > > > > > > http://www.physionet.org/physiobank/database/mitdb/ > > > > > > > > Meanwhile, if i download the data from link above(100.atr,100.dat,100.hea) > > > > and convert it into .mat file with help of following link: > > > > > > > > http://www.mathworks.com/matlabcentral/fileexchange/17115-calculating-beat-rate-of-heart-by-dwt/content/PhysioNet_ECG_Exporter_2.m > > > > > > > > Link at above could let the user to produce the specific period of output. > > > > > > > > I able to load and display the .mat file but the timing was displayed in > > > > improper value. > > > > > > Show an example. It's possible that it's just in a different display FORMAT > > > than you're expecting. > > > > > > -- > > > Steve Lord > > > firstname.lastname@example.org > > > To contact Technical Support use the Contact Us link on > > > http://www.mathworks.com > > > > > > Hi, > > > > Thanks for the feedback. > > > > Link below is my output waveform that i obtained with the ECG_converter. > > > > http://s1272.photobucket.com/user/larapinpin/media/ECG_1_zps1f11ac3c.jpg.html > > > > From the waveform, the waveform just sampled until 3600. But it suppose show the 'period' in x-axis instead of the sampling points. > > Because by using the converter, the converter will request us to key in the start time and end time for the conversion. For this case, i entered start=0 and end = 10. The output should showing 0 - 10 sec in x-axis instead of sampling points which is until 3600. > > > > Below command was used to plot the waveform, > > %%%%%%%%%%%%%%%%%%% > > clear;close all;clc; > > load 100_ECG_0_10 > > > > s1=ECG_1; > > > > plot(411);plot(s1);title('ECG_1'); > > %%%%%%%%%%%%%%%%%%% > > > > Thanks. > > > > Regards, > > Ooi.
What you got is what you asked for. What did you expect this: plot(411); would give you? Whatever, it is overwritten by: plot(s1) and 'ECG_1' gives a subscript because that's how Matlab interprets _
To get the correct abscissa, you need to include the abscissa vector in the plot command, something like this: plot(t,s1)