CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Call Matlab from perl???


New User

Feb 2, 2005, 3:27 PM

Post #1 of 3 (1000 views)
Call Matlab from perl??? Can't Post


I have this perl code that generates a bunch of data and stores in a file.

Then I use Matlab to load the data and do matrix manipulations. output is again stored in a file.

I have again a perl code that uses the output from Matlab and finishes the work.

I have been doing this manually. Run perl, run matlab, run perl. I need to do this many many times.

Is there a way I can run a matlab file (".m") directly from the .pl file. I use UNIX environment. There is no graphical stuff involved.

I appreciate any help. -swamink

Thaumaturge / Moderator

Feb 3, 2005, 2:16 AM

Post #2 of 3 (982 views)
Re: [swamink] Call Matlab from perl??? [In reply to] Can't Post

I know nothing about Matlab, but it seems that there is a Math::Mathlab which might be useful for you.

Dave Cross, Perl Hacker, Trainer and Writer
Get more help at Perl Monks


Mar 21, 2005, 11:19 AM

Post #3 of 3 (930 views)
Re: [swamink] Call Matlab from perl??? [In reply to] Can't Post

If you are running Matlab from a UNIX env, maybe u can create a shell script to run all the scripts in sequence. If the output name of the file is alreay defined in the followoing script, then the next script can pick it up and do the parsing as needed.

/usr/bin/perl .pl script

/usr/xxxxx .m script

/usr/bin/per .pl script.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives