Input filenames as ascii output?

Questions and hints about installation and usage.

Input filenames as ascii output?

Postby uffeaf » Wed Feb 13, 2013 13:10

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
uffeaf
Junior
 
Posts: 2
Joined: Mon Feb 11, 2013 09:44

Re: Input filenames as ascii output?

Postby Norbert » Thu Feb 21, 2013 21:19

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?
User avatar
Norbert
Expert
 
Posts: 173
Joined: Wed Jan 4, 2006 11:03
Location: Potsdam Institute for Climate Impact Research, Germany

Re: Input filenames as ascii output?

Postby uffeaf » Fri Feb 22, 2013 09:22

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
uffeaf
Junior
 
Posts: 2
Joined: Mon Feb 11, 2013 09:44

Re: Input filenames as ascii output?

Postby Norbert » Mon Feb 25, 2013 20:35

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.
User avatar
Norbert
Expert
 
Posts: 173
Joined: Wed Jan 4, 2006 11:03
Location: Potsdam Institute for Climate Impact Research, Germany


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron