[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need help with Octave/Java
From: |
Mike Miller |
Subject: |
Re: Need help with Octave/Java |
Date: |
Tue, 17 Jul 2018 10:58:44 -0700 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
On Tue, Jul 17, 2018 at 12:31:23 -0400, Walter Grossman wrote:
> Though "Constants" is an interface and can't be instantiated, the commands
> below work in Matlab. I understand that Octave doesn't have an import
> command as Matlab does so how do I mimic this behavior? Do I need to
> create a java object in java that implements the interface? It would be
> better if I could do something in octave.
>
> Thanks.
>
> Matlab code:
> clear all
> >> import org.orekit.utils.*
> >> c=Constants.SPEED_OF_LIGHT
> c =
> 299792458
> >>
Eventually Octave will support this syntax.
For now, you can use the internal workaround function __java_get__:
__java_get__ ('org.orekit.utils.Constants', 'SPEED_OF_LIGHT')
--
mike
signature.asc
Description: PGP signature