help-octave
[Top][All Lists]
Advanced

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

Re: Running external program from Octave


From: Lester Anderson
Subject: Re: Running external program from Octave
Date: Thu, 28 Apr 2016 11:03:23 +0100

Kind of works:

>> y = dos('grdfft test2.grd -Gout.grd -D')
grdfft: Warning: The z-range, [-2.40962e+008,4.8311e+008], might
exceed the significand's precision of 24 bits; round-off errors may
occur.
y = 0
>>

Ignore the warning bit, this was a random test, but why does it return
a value of 0 ?


On 28 April 2016 at 10:03, Carlo De Falco <address@hidden> wrote:
>
> On 28 Apr 2016, at 10:32, Lester Anderson <address@hidden> wrote:
>
>> Hello,
>>
>> Is there a way to run an external program from within an Octave .m
>> file? I am using 4.0.2 on Windows, and would like to integrate GMT to
>> do processing and pass the result back to the main Matlab.
>>
>> Is the a function equivalent to say:
>>
>> dos('grdfft test.grd -Gfft.grd -N500/500')
>>
>> netc
>>
>> so the GMT program grdfft runs and generates a netCDF file (fft.grd)
>> which can then be read into Octave (via netcdf package).
>>
>> Thanks
>> Lester
>
> Is this section of the manual useful for answering your question?
>
> http://www.gnu.org/software/octave/doc/interpreter/Controlling-Subprocesses.html#Controlling-Subprocesses
>
>
> c.



reply via email to

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