Sourcecode
rasch@rasch:~> octave
GNU Octave, version 2.1.50 (i686-pc-linux-gnu).
...
octave:1> ra=ra_lib_init
ra = 145017272
octave:2> meas=ra_meas_open(ra, '/home/rasch/ecgs/AT011030_rdi.ART', 0)
meas = 145244336
octave:3> rec=ra_rec_get_first(meas, 0)
rec = 145421120
octave:4> num_ch=ra_rec_get_info(rec, 'rec_num_channel')
num_ch = 5
octave:5> ch_all=[];
octave:6> for i=0:(num_ch-1)
> ch=ra_raw_get(rec, i, 0, 10000);
> ch_all=[ch_all ch'];
> endfor
octave:7> whos ch_all
*** local user variables:
prot type rows cols name
==== ==== ==== ==== ====
rwd matrix 10000 5 ch_all
octave:8> samplerate=ra_ch_get_info(rec, 0, 'ch_samplerate')
samplerate = 1600
octave:9> x=0:9999;
octave:10> x = x / samplerate;
octave:11> figure(0); plot(x, ch_all(:,1));
octave:12> figure(1); plot(x, ch_all(:,2));
octave:13> figure(2); plot(x, ch_all(:,3));
octave:14> figure(3); plot(x, ch_all(:,4));
octave:15> figure(4); plot(x, ch_all(:,5));
octave:16>
|