From help-octave-request Tue Feb 9 23:34:08 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA00400; Tue, 9 Feb 93 23:34:08 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA00394; Tue, 9 Feb 93 23:34:07 -0600
Received: by schoch.che.utexas.edu (5.61/1.34/CCWF 1.20)
id AA25476; Tue, 9 Feb 93 23:36:45 -0600
Message-Id: <9302100536.AA25476@schoch.che.utexas.edu>
To: help-octave
Subject: Version 0.67 is available from ftp.che.utexas.edu
Date: Tue, 09 Feb 93 23:36:44 CST
From: John Eaton
Sender: help-octave-request
Version 0.67 of Octave is available via anonymous ftp from
ftp.che.utexas.edu in the directory /pub/octave along with diffs from
previous versions.
In addition to a number of bug fixes, here is a summary of recent
changes:
Summary of changes for version 0.67:
-----------------------------------
* New functions:
find -- return the indices of nonzero elements.
* Zero-one style indexing now works. For example,
a = [1,2,3,4];
b = a([1,0,0,1])
sets b to the first and fourth elements of a.
Zero-one style indexing also works for indexing the left hand side
of an assignment. For example,
a = rand (1,2;3,4);
a([0,1],:) = [-1,-2]
sets the second row of a to [-1 -2]
The behavior for the ambiguous case
a = [1,2,3,4];
b = a([1,1,1,1]);
is controlled by the new global variable `prefer_zero_one_indexing'.
If this variable is equal to 'true', b will be set to [1 2 3 4].
If it is false, b will be set to [1 1 1 1]. The default value is
'false'.
* Using the new global variable `propagate_empty_matrices', it is
possible to have unary and binary operations on empty matrices
return an empty matrix. The default value of this variable is
'warn', so that empty matrices are propagated but you get a
warning. Some functions, like eig and svd have also been changed
to handle this.
* Empty matrices can be used in conditionals, but they always
evaluate to `false'. With propagate_empty_matrices = 'true', both
of the following expressions print 0:
if [], 1, else 0, end
if ~[], 1, else 0, end
* Octave no longer converts input like `3.2 i' or `3 I' to complex
constants directly because that causes problems inside square
brackets, where spaces are important. This abbreviated notation
*does* work if there isn't a space between the number and the i,
I, j, or J.
Summary of changes for version 0.66:
-----------------------------------
* Logical unary not operator (~ or !) now works for complex.
* Left division works.
* Right and left element by element division should work correctly
now.
* Numbers like .3e+2 are no longer errors.
* Indexing a matrix with a complex value doesn't cause a core dump.
* The min and max functions should work correctly for two arguments.
* Improved (I hope!) configuration checks.
* Octave is now installed as octave-M.N, where M and N are version
numbers, and octave is a link to that file. This makes it
possible to have more than one version of the interpreter installed.
--
John W. Eaton | 4.3BSD is not perfect. -- Leffler, et al. (1989).
jwe@che.utexas.edu |
From help-octave-request Wed Feb 10 07:17:13 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA03316; Wed, 10 Feb 93 07:17:13 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA03307; Wed, 10 Feb 93 07:17:06 -0600
Received: by lte.lte.e-technik.uni-erlangen.de
(16.8/16.2) id AA29797; Wed, 10 Feb 93 14:18:10 +0100
Date: Wed, 10 Feb 93 14:18:10 +0100
From: Uwe Bonnes
To: help-octave
Subject: Q: Anyone ported octave to HPUX on a Series 9000/730 ?
Sender: help-octave-request
As compilation ends with hangup with my configuration: Has anyone ported octave successfully to a hp 9000/730? Any hints welcome !
Uwe Bonnes bon@lte.e-technik.uni-erlangen.de
From help-octave-request Thu Feb 11 20:18:06 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA10345; Thu, 11 Feb 93 20:18:06 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA10339; Thu, 11 Feb 93 20:18:00 -0600
Received: by relay.tek.com id ; Thu, 11 Feb 93 18:04:37 -0800
Received: from soul.tv.tek.com by tektronix.TEK.COM (4.1/8.0)
id AA06018; Thu, 11 Feb 93 18:03:08 PST
Received: from blazers.tv.tek.com by soul.tv.tek.com with SMTP id AA13780
(5.65c.tv/IDA-1.4.4 for ); Thu, 11 Feb 1993 18:03:02 -0800
Received: by blazers.tv.tek.com (4.1/SMI-4.1(tv.tek.com))
id AA12287; Thu, 11 Feb 93 18:03:11 PST
Date: Thu, 11 Feb 93 18:03:11 PST
From: richard@blazers.tv.tek.com (Richard Kim)
Message-Id: <9302120203.AA12287@blazers.tv.tek.com>
To: Octave List
Cc: richard@blazers.tv.tek.com
Subject: two comilation errors
Comments: Hyperbole mail buttons accepted, v3.05P.
Sender: help-octave-request
I use SPARC IPC, SunOS 4.1.1, X11R5
gcc-2.3.3
octave-0.67 (patched from 0.66 to 0.67)
First, an error with src/lex.cc:
g++ -O -g -Wall -I. -I./../liboctave -I./.. -I. -I../liboctave -I.. -DNPSOL_MISSING=1 -DQPSOL_MISSING=1 -DFSQP_MISSING=1 -DHAVE_UNISTD_H=1 -DDIRENT=1 -DRETSIGTYPE=void -DHAVE_TERMIO_H=1 -DHAVE_FINITE=1 -DHAVE_ISNAN=1 -DHAVE_ISINF=1 -DHAVE_IEEE_MATH=1 -DUNIXPLOT=1 -DF77_APPEND_UNDERSCORE=1 -c lex.cc -o lex.o
In file included from /usr/local/lib/g++-include/std.h:25, from /usr/local/lib/g++-include/osfcn.h:5, from lex.cc:35:
/usr/local/lib/g++-include/stdlib.h:35: declaration of `void free (void *)' with different language linkage
lex.cc:14: previous declaration here
lex.l:396: warning: `yy_last_accepting_state' defined but not used
lex.l:396: warning: `yy_last_accepting_cpos' defined but not used
gmake[1]: *** [lex.o] Error 1
I tried commenting out the offending line in src/lex.cc:
/* void free( void* ); -rk2/11/93 3:35pm. */
This gets rid of the above error.
Second, while linking "src/octave", the loader gives the following error:
ld: Undefined symbol
_malloc__FUi
What is wrong?
Richard Y. Kim (503) 627-2375 (Office)
richard@tv.tv.tek.com (503) 627-1707 (Fax)
From help-octave-request Fri Feb 12 15:35:00 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA02609; Fri, 12 Feb 93 15:35:00 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA02603; Fri, 12 Feb 93 15:34:56 -0600
Via: uk.ac.aston; Fri, 12 Feb 1993 19:11:49 +0000
Received: from peg1.aston.ac.uk by email.aston.ac.uk with SMTP (PP)
id <05585-0@email.aston.ac.uk>; Fri, 12 Feb 1993 10:28:31 +0000
Received: From PCMAIL/WORKQUEUE by peg1.aston.ac.uk via Charon 3.4 with IPX
id 100.930212103127.416; 12 Feb 93 10:32:23 -0500
Message-Id:
To: richard@blazers.tv.tek.com, help-octave
From: John Fletcher
Date: 12 Feb 93 10:31:21 GMT
Subject: Re: two comilation errors
Reply-To: J.P.Fletcher@aston.ac.uk
X-Mailer: Pegasus Mail v2.2 (R4b).
Sender: help-octave-request
> Date: Thu, 11 Feb 93 18:03:11 PST
> From: richard@blazers.tv.tek.com (Richard Kim)
> To: Octave List
> Cc: richard@blazers.tv.tek.com
> Subject: two comilation errors
>
> I use SPARC IPC, SunOS 4.1.1, X11R5
> gcc-2.3.3
> octave-0.67 (patched from 0.66 to 0.67)
>
>
>
> Second, while linking "src/octave", the loader gives the following error:
>
> ld: Undefined symbol
> _malloc__FUi
>
This looks to me that malloc is being treated as a C++ routine rather
than a C routine, hence the mangled name. I guess that is a header
problem. The header should have extern "C" put round it in C++
context.
>
> What is wrong?
>
> Richard Y. Kim (503) 627-2375 (Office)
> richard@tv.tv.tek.com (503) 627-1707 (Fax)
>
I hope this helps.
John
---------------------------------------------------------------------
Dr John P. Fletcher
Department of Chemical Engineering and Applied Chemistry,
Aston University, Tel: (44) 21 359 3611 ext 4625
Aston Triangle, Email(Most systems): J.P.FLETCHER@ASTON.AC.UK
BIRMINGHAM B4 7ET U.K. Email(JANET only): J.P.FLETCHER@UK.AC.ASTON
---------------------------------------------------------------------
From help-octave-request Mon Feb 15 13:37:44 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA14502; Mon, 15 Feb 93 13:37:44 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA14496; Mon, 15 Feb 93 13:37:40 -0600
Received: by june.che.utexas.edu (5.57/Ultrix3.0-C)
id AA23568; Mon, 15 Feb 93 13:37:38 -0600
Message-Id: <9302151937.AA23568@june.che.utexas.edu>
To: help-octave, krmuske
Subject: external file questions
Date: Mon, 15 Feb 93 13:37:38 CST
From: "John C. Campbell"
Sender: help-octave-request
I want to do some fancy stuff from a m-file (oc-file?). I want to
read some data from a direct access file and store it in variables in
an octave session. So I need to know...
1. Can I open and read a direct access file from within octave?
2. Can I call a shell script or C++ program from within octave.
3. Would it be easier to include some octave source code that will
read the data file?
An additional possibility would be to process this massive
thermochemical data file into single component files that can be read
as octave scripts. This would probably take up more disk space. I am
interested in the best way to do this, but I am not sure that I am on
the right track. Comments?
--------
John C. Campbell :
jcc@che.utexas.edu :
University of Texas-Austin :
Dept. of Chemical Engineering :
From help-octave-request Tue Feb 16 09:20:56 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA12927; Tue, 16 Feb 93 09:20:56 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA12921; Tue, 16 Feb 93 09:20:53 -0600
Received: from cornflower.NeXTwork.Rose-Hulman.Edu (cornflower) by red. (5.65c#3#/NeXT-2.0) id AA10211
ident-sender: unauthenticated; Tue, 16 Feb 1993 10:20:49 -0500
Message-Id: <199302161520.AA10211@ red. >
Received: by cornflower.NeXTwork.Rose-Hulman.Edu (NX5.67c/NeXT-2.0)
id AA00252; Tue, 16 Feb 93 10:20:45 -0500
Date: Tue, 16 Feb 93 10:20:45 -0500
From: bohlkejh@NeXTwork.Rose-Hulman.Edu
Received: by NeXT.Mailer (1.87.1)
Received: by NeXT Mailer (1.87.1)
To: help-octave
Subject: octave on NeXT
Sender: help-octave-request
Hi,
I have all of the required software installed on my NeXT but
I cannot get the configure script to make any makefiles. The
configure scripts that come with gnu software work fine on my
machine. Any clues?
Jon
From help-octave-request Tue Feb 16 17:19:35 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA21378; Tue, 16 Feb 93 17:19:35 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA21372; Tue, 16 Feb 93 17:19:32 -0600
Received: by lte.lte.e-technik.uni-erlangen.de
(16.8/16.2) id AA01013; Wed, 17 Feb 93 00:18:35 +0100
From: Uwe Bonnes
Subject: Preliminary fixes to port octave to hpux
To: help-octave
Date: Wed, 17 Feb 93 0:18:32 MEZ
In-Reply-To: help-octave@che.utexas.edu
Mailer: Elm [revision: 70.30]
Sender: help-octave-request
As I am no expert in C(++) or unix here my quick (and dirty)fixes to compile "octave" (ver 0.67) on a HP720 under hpux:
If I have gotten something wrong, corrections are welcome!
--1--
./builtins.cc:163: initialization between incompatible pointer types
./builtins.cc:163: initialization between incompatible pointer types
./builtins.cc:163: initialization between incompatible pointer types
The a[sin,cos,tan]h-functions are not defined (at least not at the places where to expect them) so I made comments around the lines initializing these functions.
--2--
mappers.cc: In function `double xfinite (double)':
mappers.cc:106: `DBL_MAX' undeclared (first use this function)
mappers.cc:106: (Each undeclared identifier is reported only once
mappers.cc:106: for each function it appears in.)
mappers.cc:108: warning: control reaches end of non-void function
mappers.cc: In function `double xisinf (double)':
mappers.cc:123: `DBL_MAX' undeclared (first use this function)
mappers.cc:125: warning: control reaches end of non-void function
gmake[1]: *** [mappers.o] Error 1
Define -DHAVE_IEEE_MATH manually
--3--
ld: Unsatisfied symbols:
getwd (code)
finite (code)
getwd: for hp-ux use getcwd and don't include in g-builtins.cc and utils.cc
finite: in mappers.cc use ( xisinf(x)==0 ) instead of (finite (x)) as finite is not available.
-----
Perhaps:
- these hints are of use for somebody
- remedy can be included in the next version of octave (I will help if possible)
With best regards
Uwe Bonnes bon@lte.e-technik.uni-erlangen.de
From help-octave-request Wed Feb 17 02:58:29 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA26093; Wed, 17 Feb 93 02:58:29 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA26087; Wed, 17 Feb 93 02:58:26 -0600
Received: by june.che.utexas.edu (5.57/Ultrix3.0-C)
id AA07739; Wed, 17 Feb 93 02:58:24 -0600
Message-Id: <9302170858.AA07739@june.che.utexas.edu>
To: bardo@ief-paris-sud.fr (Bardo Muller)
Cc: help-octave
Subject: Re: programming question
In-Reply-To: Your message of Tue, 16 Feb 93 17:44:32 +0100
Date: Wed, 17 Feb 93 02:58:24 CST
From: John Eaton
Sender: help-octave-request
On Tue, 16 Feb 93 17:44:32 +0100, bardo@ief-paris-sud.fr (Bardo Muller) wrote:
: I am about to adapt a little matlab routine to octave code.
: So far it doesn't complain, but it is not running either..
: ab=x\ydata; # here it complains about non-quare matrix
With Matlab, this would solve a least-squares problem if x isn't
square. This simply hasn't been implemented in Octave yet. Maybe by
0.69, certainly by 1.0.
jwe
From help-octave-request Wed Feb 17 06:40:27 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA27244; Wed, 17 Feb 93 06:40:27 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA27238; Wed, 17 Feb 93 06:40:22 -0600
Received: from ief-paris-sud.fr (marion.ief-paris-sud.fr) by chenas.inria.fr (5.65c8d/92.02.29)
via Fnet-EUnet id AA13313; Wed, 17 Feb 1993 13:40:19 +0100 (MET)
Received: from speedy.ief-paris-sud.fr by ief-paris-sud.fr (4.1/SMI-4.1)
id AA06439; Wed, 17 Feb 93 13:34:07 +0100
Received: from gonzales.ief-paris-sud.fr by speedy.ief-paris-sud.fr (4.1/SMI-4.1)
id AA04531; Wed, 17 Feb 93 13:47:05 +0100
Date: Wed, 17 Feb 93 13:47:05 +0100
From: bardo@ief-paris-sud.fr (Bardo Muller)
Message-Id: <9302171247.AA04531@speedy.ief-paris-sud.fr>
To: help-octave
Subject: plot problem
Sender: help-octave-request
octave:11> out=[x,sin(x)]
out =
1 0.841471
2 0.909297
3 0.14112
octave:12> plot(out)
Cannot open load file '-'
line 0: (No such file or directory)
octave:13> plot(out')
Cannot open load file '-'
line 0: (No such file or directory)
octave:14>
What is wrong ?
From help-octave-request Wed Feb 17 08:01:58 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA28451; Wed, 17 Feb 93 08:01:58 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA28445; Wed, 17 Feb 93 08:01:53 -0600
Received: by dsmisp.mi.infn.it (5.57/Ultrix3.0-C)
id AA24450; Wed, 17 Feb 93 15:01:49 +0100
From: ameroni@dsmisp.mi.infn.it (Alberto Meroni)
Message-Id: <9302171401.AA24450@dsmisp.mi.infn.it>
Subject: Matlab compatibility
To: help-octave (Octave)
Date: Wed, 17 Feb 1993 15:01:48 +0100 (MET)
X-Mailer: ELM [version 2.4 PL3]
Content-Type: text
Content-Length: 132
Sender: help-octave-request
Sorry to disturb the Net, is octave supposed, ar least in principle and in a far
future compatible with matlab ?
Alberto Meroni
From help-octave-request Wed Feb 17 14:53:45 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA04711; Wed, 17 Feb 93 14:53:45 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA04705; Wed, 17 Feb 93 14:53:44 -0600
Received: by schoch.che.utexas.edu (5.61/1.34/CCWF 1.20)
id AA16366; Wed, 17 Feb 93 14:53:42 -0600
Message-Id: <9302172053.AA16366@schoch.che.utexas.edu>
To: bardo@ief-paris-sud.fr (Bardo Muller)
Cc: help-octave
Subject: Re: plot problem
In-Reply-To: Your message of Wed, 17 Feb 93 13:47:05 +0100
Date: Wed, 17 Feb 93 14:53:42 CST
From: John Eaton
Sender: help-octave-request
: octave:11> out=[x,sin(x)]
: out =
:
: 1 0.841471
: 2 0.909297
: 3 0.14112
:
: octave:12> plot(out)
: Cannot open load file '-'
: line 0: (No such file or directory)
:
: What is wrong ?
What version of gnuplot are you using? Did you change the value of
the global variable gnuplot_binary?
Octave executes a modified version of gnuplot (normally installed in
${prefix}/lib/octave/notgnuplot). The modified version recognizes a
final argument of `-' to mean that it should display the gnuplot
prompt after executing commands from all other input files.
I think this is useful since it allows one to use the gnuplot commands
to modify the appearance of the plot. It would be nice to also have
some of this functionality available at the octave prompt, but that
would mean duplicating a lot of the gnuplot code.
Plotting should be much better by the time 1.0 is released, but I
haven't worked on it much yet. Suggestions (or code :-) are welcome.
jwe
From help-octave-request Wed Feb 17 15:07:06 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA04823; Wed, 17 Feb 93 15:07:06 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA04817; Wed, 17 Feb 93 15:07:04 -0600
Received: by schoch.che.utexas.edu (5.61/1.34/CCWF 1.20)
id AA16421; Wed, 17 Feb 93 15:07:01 -0600
Message-Id: <9302172107.AA16421@schoch.che.utexas.edu>
To: ameroni@dsmisp.mi.infn.it (Alberto Meroni)
Cc: help-octave
Subject: Re: Matlab compatibility
In-Reply-To: Your message of Wed, 17 Feb 93 15:01:48 +0100
Date: Wed, 17 Feb 93 15:07:01 CST
From: John Eaton
Sender: help-octave-request
: Sorry to disturb the Net, is octave supposed, ar least in principle
: and in a far future compatible with matlab ?
Yes, though some Matlab `features' may not be available by default,
but can be switched on by changing the values of some global
variables.
For example, the variable `do_fortran_indexing' controls whether or
not to allow things like:
a = [1,2;3,4];
a(3)
By default, Octave gives an error message for this, since using a
single index is only really makes sense for vectors. If you set the
value of `do_fortran_indexing' to `true', the commands above will
print `ans = 2'.
The major problem areas right now are:
* Most Matlab string operations are not supported.
* Assignment of [] to delete matrix elements doesn't work.
* Plotting is lame.
* The format of the files produced by the save command is completely
different.
* The division operators won't solve least-squares problems yet.
* Recursive functions don't really work properly yet.
* Some missing commands/functions.
There may be others that I can't remember just now. If there are
missing features that you need, let me know.
jwe
From help-octave-request Sat Feb 20 11:20:12 1993
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA27628; Sat, 20 Feb 93 11:20:12 -0600
Received: by ward.che.utexas.edu (5.57/Ultrix3.0-C)
id AA27622; Sat, 20 Feb 93 11:20:09 -0600
Received: from ief-paris-sud.fr (marion.ief-paris-sud.fr) by chenas.inria.fr (5.65c8d/92.02.29)
via Fnet-EUnet id AA12130; Sat, 20 Feb 1993 18:20:04 +0100 (MET)
Received: from speedy.ief-paris-sud.fr by ief-paris-sud.fr (4.1/SMI-4.1)
id AA08154; Sat, 20 Feb 93 18:13:49 +0100
Received: from gonzales.ief-paris-sud.fr by speedy.ief-paris-sud.fr (4.1/SMI-4.1)
id AA00676; Sat, 20 Feb 93 18:26:45 +0100
Date: Sat, 20 Feb 93 18:26:45 +0100
From: bardo@ief-paris-sud.fr (Bardo Muller)
Message-Id: <9302201726.AA00676@speedy.ief-paris-sud.fr>
To: help-octave
Subject: octave goodies
Cc: bardo@ief-paris-sud.fr
Sender: help-octave-request
Contents:
1) matlab/octave doc:
2) solver for non-square or ill-conditioned matrices systems + application
3) octave plotter
4) emacs matlab/octave
===============================================================================
1) For those who can't wait for the octave doc:
Take the manual of the old matlab (well, some things may differ,
but most is still ok and you get ideas for naming new routines).
Get it for example from cs.ubc.ca:/mirror1/next/2.0-release/source/matlab.tar.Z
Anyone who got this running on a sun - please e-mail if you succeeded.
===============================================================================
2) For those who can't wait for \ doing non-square matrices:
a\b means inv(a)*b, or more precise
if a is not square, this is done in a least squares sense.
(explanation by the inventor of matlab)
function x=svdsolve(a,b)
%
% x=svdsolve(a,b)
%
% use it for
%
% [A] x] =b] when [A] is a non-square matrix
% or ill-conditioned
%
% source: numerical recipes pp 59
%
if (nargin!=2)
error ('svdsolve: need two arguments: matrix a, vector b')
endif
[u,w,v]=svd(a);
for i=1:min(size(w))
w(i,i)=1./w(i,i);
endfor
x=v*w'*u'*b;
endfunction
function [a,b]=ratsvd(xdata,ydata,ntop,nbot)
%
% [a,b]=ratsvd(xdata,ydata,ntop,nbot)
%
% Pade approximation of discrete ydata=f(xdata)
% by a rational function of the form:
%
% y(x) = sum(1=>ntop)( a(j)*x^(j-1) ) /
% ( 1 + sum(1=>nbot)( b(j)*x^(j)) )
%
% xdata,ydata input data vectors (real or complex)
% ntop,nbot number of series terms used in the
% numerator and the denominator.
%
% adapted from ratcof.m originally by
% H.B.Wilson, Oct 1988
%
ydata=ydata(:);
xdata=xdata(:);
m=length(ydata);
nbot=nbot-1;
%
if (nargin==3)
nbot=ntop
endif;
if (nbot+ntop > m)
disp(sprintf ('\n ratsvd: system under-determined\n)
disp(sprintf ('\n ratsvd: check dmax and consider lowering requested order')
disp(sprintf ('\n ratsvd: or supply more data points.\n')
endif
x=ones(m,ntop+nbot);
x(:,ntop+1)=-ydata.*xdata;
for i=2:ntop
x(:,i)=xdata.*x(:,i-1);
endfor
for i=2:nbot
x(:,i+ntop)=xdata.*x(:,i+ntop-1);
endfor
% try ab=inv(x)*ydata, (x needs to be square for octave, so far)
ab=svdsolve(x,ydata);
a=ab(1:ntop);
if (nbot == 0)
b=1;
else
b=[1,ab(ntop+1:ntop+nbot)']';
endif
endfunction
===============================================================================
3) For those who can't wait for a full implemented plot command:
function pp(plotdata)
%
% prepare plotfile and take it to a place
% where the plotter will find it
%
errmess='\n pp: need a single matrix with at least 2 columns\n';
if (nargin != 1)
error(errmess)
elseif (isstr(plotdata))
error('\n pp: can`t plot a string\n')
endif
cols=columns(plotdata);
if (cols<2)
error(errmess)
endif
save /tmp/oplot plotdata
disp(sprintf('\n.. plot in %d variables ready \n',cols-1))
endfunction
My favourite plot programs:
2-D : xp, is one program of the MISIM circuit simulation package.
Get its executable from uwcad.ee.washington.edu
xp is fast, menu-driven and very complete
start it by the script below
3-D : xprism3 from the khoros distribution
contours, surface, shading, lightsources..
its little brother, xprism2 is a decent tool as well.
both understand directly a file saved by octave (# comment)
the whole package is quite large, ask your site-administrator
if it is installed somewhere.
A potential viewer is Xess, a powerful (and commercialized, helas)
X/Motif-based spreadsheet which allows dynamic 2-D and 2-D display
updates by other applications via user-written interfaces.
Get the non-save version from unix.hensa.ac.uk:/pub/uunet/vendor/ais/
#!/bin/sh
#
# shellfile to start the 2-D plotter xp
#
NF=`tail -1 /tmp/oplot | awk "{print NF}"`
case $NF in # clumsy...
2) echo "X Y1" >/tmp/oplot.tmp
echo "PLOT: 1 Variable found";;
3) echo "X Y1 Y2" >/tmp/oplot.tmp
echo "PLOT: 2 Variables found";;
4) echo "X Y1 Y2 Y3" >/tmp/oplot.tmp
echo "PLOT: 3 Variables found";;
5) echo "X Y1 Y2 Y3 Y4" >/tmp/oplot.tmp
echo "PLOT: 4 Variables found";;
6) echo "X Y1 Y2 Y3 Y4 Y5" >/tmp/oplot.tmp
echo "PLOT: 5 Variables found";;
7) echo "X Y1 Y2 Y3 Y4 Y5 Y6" >/tmp/oplot.tmp
echo "PLOT: 6 Variables found";;
*) echo "PLOT: not enough data - exiting..
exit;;
esac
cat /tmp/oplot | tail +5 >>/tmp/oplot.tmp
/net/speedy/home1/bardo1/xmisim/bin/xp -f /tmp/oplot.tmp
rm -f /tmp/oplot*
========================================================================
4) For those who now start writing .m files:
Get the matlab-mode for emacs in hub.ucsb.edu:/pub/emacs/matlab-mode.el
========================================================================
What's next ? Who knows of matlab/octave file archives, besides those
of research.att.com:/netlib/matlab and its mirrors ?
Comments to the address below.
Hope to hear from you soon, salut
Bardo
------------
Bardo MULLER Phone : [33] [1] 69 41 78 50
Institut d'Electronique Fondamentale Fax : [33] [1] 60 19 25 93
Bat. 220 Universite Paris Sud e-mail : bardo@ief-paris-sud.fr
91405 ORSAY CEDEX FRANCE