help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling Octave from a Fortran Program


From: Valmor de Almeida
Subject: Re: Calling Octave from a Fortran Program
Date: Thu, 16 Jun 2011 18:25:56 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b3pre Lanikai/3.1.10

On 06/15/2011 12:36 PM, the_eggs wrote:
> Hi all,
> 
> I've done some searching in the mailing list and on google and haven't found
> an answer to my question. I'm using a modified version of Tinker (molecular
> modelling software written in F77) to perform molecular dynamics
> simulations. I have a vector containing a million points of data and am
> using the data-smoothing package to smooth it and then I will do some
> additional calculations with the smoothed data.
> 
> For various reasons I don't want to do the calculations post-processing
> style and thus I need to call Octave from a subroutine within Tinker.
> 
> I need to do the following:
> -set up a vector (x) with the numbers 1 to 1 000 000 using linspace
> -read in a vector (y) containing my million points of data
> -perform 'regdatasmooth' (which is part of the data-smoothing package) to
> smooth my data
> -output the smoothed data back to Fortran so I can perform perform some
> calculations on it

>From your fortran code you can write a file and do system call to run
your octave code which you can program to read the fortran file do what
you need and write the output to a file. In your fortran code, after the
system call, you can read in the file your octave code wrote.

Simple but not elegant.

--
Valmor
> 
> I found one post that was related to this and received one response:
> 
> http://octave.1599824.n4.nabble.com/fortran-octave-td1603021.html
> 
> However, the response concerns calling Fortran from Octave and I want to
> call Octave from Fortran, thus I am posting here.
> 
> Thanks in advance for any help.
> 
> 
> 
> --
> View this message in context: 
> http://octave.1599824.n4.nabble.com/Calling-Octave-from-a-Fortran-Program-tp3599927p3599927.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave



reply via email to

[Prev in Thread] Current Thread [Next in Thread]