|
From: | Ben Abbott |
Subject: | Re: Concerning running Fortran prog from Octave |
Date: | Sun, 30 Mar 2008 14:14:18 -0400 |
On Mar 30, 2008, at 12:29 PM, george brida wrote:
I took a quick look. I assume you just want to run "triples_test" from octave in the same way you would from a dos window? If so, you can try the attached script. It's not pretty, but should be enough to get you started. Note, that to get your program to run properly on my Mac, I removed the "C:\" reference from the fortran code. For DOS you may need to make the change below, to my script. - system ("./triples_test DATA.DAT > data.out"); + system ("triples_test DATA.DAT > data.out"); This script returns a column for each column of input. It extracts a number from each line of output and returns the numeric values. For example, > x = do_triples(rand(10,6)) x = 10.00000 10.00000 10.00000 10.00000 10.00000 10.00000 120.00000 120.00000 120.00000 120.00000 120.00000 120.00000 -0.12222 -0.00000 0.01111 0.08889 -0.05000 0.06111 0.00450 0.01194 0.00644 0.00439 0.00860 0.00713 -1.82280 -0.00000 0.13850 1.34230 -0.53920 0.72370 In any event, your fortran program is rather simple. It can easily be written directly in Octave. Ben |
do_triples.m
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |