Using TISEAN package in Matlab

Hi,
I want to use functions from the TISEAN package in Matlab and I've tried to implement this as suggested here:
Say I wanna apply the TISEAN function "rms" to a vector of doubles, called "x". Here's what I do:
tiseanPath = 'C:\TISEAN\Tisean_3.0.0\bin\'
system([tiseanPath,'rms -a x'])
When I run these lines I get an error message saying "Cannot open input file x". What am I doing wrong here?

 Accepted Answer

Walter Roberson
Walter Roberson on 31 Dec 2012
Edited: Walter Roberson on 31 Dec 2012
You need to write the content of the vector into a file, and then you need to name that file where you have "x" on the system() command line.
For example,
tismean_file = 'tismean_input.txt';
xv = x(:);
save(tismean_file, 'xv', '-ascii');
result = system( sprintf('%srms -a %s', tismeanPath, tismean_file) );
The result will probably be in the form of text.

8 Comments

I see, thank you...and that's the one and only possibility of passing the array to the function?
From time to time people ask whether there are interfaces to program A or program B. We are command line purits so we don't need such interfaces.
I have also checked the command line options for "rms" and I see that there is no option for giving the inputs on the command line itself instead of in a file.
Glancing around a bit, I see that people have created interfaces of some kind for R and for Python.
The code is all under Gnu Public License, so if you wish you could edit the source to create ways to call the routines directly from MATLAB, passing in binary values. I did not examine the source to get an idea of how much work that would be.
dave
dave on 31 Dec 2012
Edited: dave on 31 Dec 2012
I just found an m-file that wraps TISEAN functions. As far as I can tell it also creates text files for the input and output. Any suggestions how to modify this m-file so that the created text files are automatically deleted again right after the computations are done?
The second last line of that .m is
%delete (outfn);
Remove the % to leave
delete (outfn);
I'm still pretty new to Matlab, but I admit that I could have figured that out myself ;) Thank you very much for your help, Walter...
Hi Dave or Walter- I am trying to do the same thing as above. I have 2 questions- What formats of data can TISEAN from Matlab read? I was able to use the choose command from TISEAN from within MATLAB to read my data to a stdout. How do I run different TISEAN functions on this data? Could youhelp explain the code above suggested by Dave to read in the data. Sorry, I am new to MATLAB. Thanks. system([tiseanPath, 'choose G:\Modeling\346561.csv']);
TISEAN 3.0.0 (C) R. Hegger, H. Kantz, T. Schreiber (1998-2007)
C:\cygwin\Tisean\Tisean_3.0.0\bin\choose: Choose columns and sub-sequences from a file reading from columns 1 opened G:\Modeling\346561.csv for input 35 values read from file: G:\Modeling\346561.csv writing to stdout writing to stdout 35 values written to stdout 12.50000 12.70000 .. . . . . . . . . . . . 11.70000 12.20000 12.20000
Hi Ashwani, I'm sorry to tell you that I stopped using TISEAN (from Matlab) a long time ago, so I can't really help you with your question. Hopefully another user can give you the answers you're looking for. (If not, you could give it a try at stackoverflow.com)
Dave.do you still use TISEAN- maybe from the command line interface?

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!