help-octave
[Top][All Lists]
Advanced

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

Re: PowerShell Commands Not Working


From: Kai Torben Ohlhus
Subject: Re: PowerShell Commands Not Working
Date: Fri, 25 Oct 2019 13:09:36 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 10/25/19 3:33 AM, Richard Obregon wrote:
> Hello,
> 
>  
> 
> I have been using PowerShell for some time and would like to make my
> life easier by using Octave as a simple line command to initiate the
> protocol for Octave. I have tried using “octave” as a one-line command
> (similar to python) but it is giving me an error. I have added the
> entire directory for octave in the PATH. Is there something I have
> missed for what I need to do or what is the name of the .exe for the
> 5.1.0 release? Because my understanding is that the PATH needs to
> include the directory for the .exe and just typing “octave” should open
> octave.exe. Is there a different name for this release?
> 
>  
> 
> Thanks,
> 
> Ricky Obregon
> 
The better way to go is to call

   C:\Octave\Octave-5.1.0.0\mingw64\bin\octave.bat

which setups some necessary paths in cmd.exe and PowerShell and define
some alias for it.  Then you can pass commands to Octave by adding for
example:

   --eval "format long; sin (pi/2) + 4"

and get the output to the respective MS Windows shell.  But some small
experiments showed that PowerShell does not properly pass the --eval
input to Octave and causes errors, which I have no clue how to
fix/properly escape them at the moment.

   --eval "sin(pi)"

If you have a satisfying solution accepting arbitrary input, please
share it with us =)

HTH,
Kai



reply via email to

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