help-octave
[Top][All Lists]
Advanced

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

Starting m-file from command line/shortcut in Windows


From: Allen.Windhorn
Subject: Starting m-file from command line/shortcut in Windows
Date: Thu, 24 Jul 2008 11:05:50 -0500

Hello all,

I have Octave 3.0.0 on Windows XP.  I would like to start an Octave
m-file from the command line and also from a desktop shortcut, have it
run until the user is done, then automatically close Octave (the last
part is optional).

I used the following command from a command shell:

H:\>"c:\Program Files\Octave\bin\octave-3.0.0" -q -persist
"h:/work/matlab/unbal.m"

Octave starts and brings up the program but dies:
--------
 - Use `pkg list' to see a list of installed packages.
 - SciTE editor installed. Use `edit' to start the editor.
 - MSYS shell available (c:\Program Files\Octave\msys).
 - Graphics backend: jhandles.


           CALCULATE VOLTAGE UNBALANCE

Enter phase currents.  Note: all currents must be > 0 for case 3
Enter A phase current p.u. <0>: panic: Segmentation violation --
stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete
---------

When I use the same command in a shortcut I either get a blank screen or
Octave starts and hangs without giving me a prompt.  Without the options
the result is the same.

Is this a bug, or am I doing something wrong?  Do I need a different
input method in batch mode?

Following is a bit of the m-file code:

---------
%unbal -- Calculate voltage unbalance given winding currents
% Using assumptions about distribution of currents, and given three
% winding currents, power factor, and reactances, calculate phase
% voltages and voltage unbalance.
%
% Assumptions differ by case:
%
% 1. Input currents as phasors (power factor ignored)
%
% 2. Assume all currents spaced at 120 degrees, line to neutral
%
% 3. Assume no zero sequence current
%
% Allen Windhorn, 24 May 2000
%
% Initialize things:
%
format short g; %Display results to more precision
clear all
%
a = -0.5+j*(sqrt(3)/2);
r2d = 180/pi;
TRUE = (1==1);
FALSE = (1==2);
%
% Print header
%
disp(' ');
disp('           CALCULATE VOLTAGE UNBALANCE');
disp(' ')
disp('Enter phase currents.  Note: all currents must be > 0 for case
3');
%
% Get values of phase currents, power factor, reactances
% Perform error checking to make sure values entered
%
Ia = input('Enter A phase current p.u. <0>: ');
if isempty(Ia)
  Ia = 0;
end
%
Ib = input('Enter B phase current p.u. <0>: ');
if isempty(Ib)
  Ib = 0;
-----------

Thanks in advance for any advice.

Regards,
Allen
-- 
Allen Windhorn, P.E. (MN)  (507) 345-2782
Kato Engineering
P.O. Box 8447, N. Mankato, MN  56002
address@hidden



reply via email to

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