Input filenames as ascii output?

Questions and hints about installation and usage.
Post Reply
uffeaf
Junior
Posts: 2
Joined: Mon Feb 11, 2013 09:44
Affiliation (Univ., Inst., Dept.): Aarhus University
Location: Aarhus University, Denmark
Research field: (Astro)physics, neuroscience, psychology

Input filenames as ascii output?

Post by uffeaf »

First of all, thank you for this fine software package.

I'm running the crqa, and I've gor the RQA measures and computational parameters written to an ascii file by means of the matlab command fprint, e.g. the line

Code: Select all

fprintf(fileID, 'RR\t%s\r\n', RR);
prints RR and the RR vlue to a text file.

How do I get the input filenames (vectors X and Y) written to the ascii output file?

Regards, Uffe
Regards,

Uffe A, Fredens
User avatar
Norbert
Expert
Posts: 183
Joined: Wed Jan 4, 2006 11:03
Affiliation (Univ., Inst., Dept.): Potsdam Institute for Climate Impact Research, Germany
Location: Potsdam, Germany
Location: Potsdam Institute for Climate Impact Research, Germany

Re: Input filenames as ascii output?

Post by Norbert »

I'm a bit confused by mixing filename and the vectors X and Y. What do your really would like to do? Just to save the original time series along the RQA measures?
uffeaf
Junior
Posts: 2
Joined: Mon Feb 11, 2013 09:44
Affiliation (Univ., Inst., Dept.): Aarhus University
Location: Aarhus University, Denmark
Research field: (Astro)physics, neuroscience, psychology

Re: Input filenames as ascii output?

Post by uffeaf »

The time series X and Y used for input have names, e.g. X='NEO1B34100011 (2012-08-30)RAW.csv' Y='NEO1B34100011 (2012-08-31)RAW.csv'.

I'd like to have the names of these time series included in the output ascii file along with the RQA results.
Regards,

Uffe A, Fredens
User avatar
Norbert
Expert
Posts: 183
Joined: Wed Jan 4, 2006 11:03
Affiliation (Univ., Inst., Dept.): Potsdam Institute for Climate Impact Research, Germany
Location: Potsdam, Germany
Location: Potsdam Institute for Climate Impact Research, Germany

Re: Input filenames as ascii output?

Post by Norbert »

Hi,

I would do it like this

Code: Select all

% calculate the RQA measures
w = 200;
ws = 100;
R = crqa(X,1,2,3,w,ws);

% open results file for writing
fid = fopen('resultsfile.dat','w');

% write the filenames in the file
fprintf(fid,'file X: %s\nfile Y: %s\n',X,Y);

% write the head line (variable names)
fprintf(fid,'\nRR\tDET');
for i = 1:ws:size(R,1)
   fprintf(fid,'%0.5f\t%0.5f\n',R(i,1),R(i,2));
end

% close the file
fclose(fid);
I hope it helps.
Post Reply