From help-octave-request@che.utexas.edu Fri May 6 18:34:48 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id SAA08119 for help-octave-outgoing; Fri, 6 May 1994 18:34:48 -0500
Received: from CSOS.ORST.EDU (CSOS.ORST.EDU [128.193.40.17]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id SAA08114 for ; Fri, 6 May 1994 18:34:47 -0500
Received: (from salehh@localhost) by CSOS.ORST.EDU (8.6.9/8.6.6) id QAA24033; Fri, 6 May 1994 16:34:43 -0700
Date: Fri, 6 May 1994 16:34:43 -0700 (PDT)
From: Hassan Saleh
Subject: MSDOS/DJGPP OCTAVE PORT ?
To: help-octave@che.utexas.edu
Message-ID:
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: help-octave-request@che.utexas.edu
Hi,
I am new to the list and was wondering if anyone has/is ported/porting
OCTAVE to MSDOS platforms .
Thanks.
H. I. SALEH
salehh@csos.orst.edu
From help-octave-request@che.utexas.edu Wed May 11 02:04:41 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id CAA00718 for help-octave-outgoing; Wed, 11 May 1994 02:04:41 -0500
Received: from stein1.u.washington.edu (stein.u.washington.edu [140.142.56.1]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id CAA00712 for ; Wed, 11 May 1994 02:04:38 -0500
Received: by stein1.u.washington.edu
(5.65+UW94.4/UW-NDC Revision: 2.30 ) id AA23218;
Wed, 11 May 94 00:04:37 -0700
X-Sender: spaz@stein1.u.washington.edu
Date: Wed, 11 May 1994 00:04:36 -0700 (PDT)
From: John Utz
Subject: z transforms, anybody?
To: Help Octave
Message-Id:
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: help-octave-request@che.utexas.edu
Hi octave people;
Has anybody out there in octave land implemented a z transform?
Also how does one do a sinc with fft? ? I tried:
octave:48> plot(arg(fft(sin(-.01:.001:.01)/(-.01:.001:.01))))
error: fft: invalid scalar argument
any suggestions?
thankyou!
OH, and is it possible to do "subplots"? As in seeing my arg(fft and
abs(fft at the same time?
********************************************************************************
John Utz spaz@stein.u.washington.edu
idiocy is the impulse function in the convolution of life
From help-octave-request@che.utexas.edu Wed May 11 12:15:36 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id MAA11112 for help-octave-outgoing; Wed, 11 May 1994 12:15:36 -0500
Received: from nessie.mcc.ac.uk (nessie.mcc.ac.uk [130.88.200.20]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id MAA11106 for ; Wed, 11 May 1994 12:15:20 -0500
Message-Id: <199405111715.MAA11106@ward.che.utexas.edu>
Received: from mailhost.mcc.ac.uk by mailhost.mcc.ac.uk
id <00407-0@mailhost.mcc.ac.uk>; Wed, 11 May 1994 18:09:41 +0100
Subject: sinc & compiled octave
To: help-octave@che.utexas.edu
Date: Wed, 11 May 1994 18:09:15 +0100 (BST)
X-Mailer: ELM [version 2.4 PL21]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 511
From: Ted Harding
Sender: help-octave-request@che.utexas.edu
1. John Utz's query about sinc(x) = sin(x)/x:
sin(-0.01:.001:.01)./(-0.1:.001:.01)
attempts to divide by zero in mid-range. A special definition for x=0
is needed, e.g.
sin([ -0.01:.001:-.001 pi/2 .001:.001:.01 ]) ...
./([ -0.01:.001:-.001 1 .001:.001:.01 ])
2. Can anyone say where a _compiled_ version of OCTAVE-1.0 for Linux
on i386 can be obtained by ftp? I haven't enough disk space to compile,
but could easily install the binary.
Ted Harding efh@nessie.mcc.ac.uk
From help-octave-request@che.utexas.edu Wed May 11 15:13:33 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id PAA18004 for help-octave-outgoing; Wed, 11 May 1994 15:13:33 -0500
Received: from stein3.u.washington.edu (stein.u.washington.edu [140.142.56.3]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id PAA17999 for ; Wed, 11 May 1994 15:13:30 -0500
Received: by stein3.u.washington.edu
(5.65+UW94.4/UW-NDC Revision: 2.30 ) id AA08204;
Wed, 11 May 94 13:13:12 -0700
X-Sender: spaz@stein3.u.washington.edu
Date: Wed, 11 May 1994 13:13:11 -0700 (PDT)
From: John Utz
Subject: Re: sinc & compiled octave
To: Ted Harding
Cc: help-octave@che.utexas.edu
In-Reply-To: <199405111715.MAA11106@ward.che.utexas.edu>
Message-Id:
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: help-octave-request@che.utexas.edu
On Wed, 11 May 1994, Ted Harding wrote:
>
> 1. John Utz's query about sinc(x) = sin(x)/x:
> sin(-0.01:.001:.01)./(-0.1:.001:.01)
> attempts to divide by zero in mid-range. A special definition for x=0
> is needed, e.g.
> sin([ -0.01:.001:-.001 pi/2 .001:.001:.01 ]) ...
> ./([ -0.01:.001:-.001 1 .001:.001:.01 ])
>
> 2. Can anyone say where a _compiled_ version of OCTAVE-1.0 for Linux
> on i386 can be obtained by ftp? I haven't enough disk space to compile,
> but could easily install the binary.
>
> Ted Harding efh@nessie.mcc.ac.uk
>
What is the latest version Octave 0.* that compiles using gcc
2.4.5 OR the libg++ version earlier then 2.5.3?
As I have spent much bandwith on back and forth with JWE on, I
can't get libg++-2.5.3 to compile on FreeBSD due to grave unhappiness
occuring in streambuf,h
ALSO, what am i missing out on running 0.73 as opposed to 1.0 ?
tnx
*******************************************************************************
John Utz spaz@stein.u.washington.edu
idiocy is the impulse function in the convolution of life
From help-octave-request@che.utexas.edu Wed May 11 15:33:53 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id PAA19157 for help-octave-outgoing; Wed, 11 May 1994 15:33:53 -0500
Received: from schoch.che.utexas.edu (schoch.che.utexas.edu [128.83.162.82]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id PAA19151 for ; Wed, 11 May 1994 15:33:51 -0500
Received: from localhost (jwe@localhost) by schoch.che.utexas.edu (8.6.8.1/8.6) with SMTP id PAA16324; Wed, 11 May 1994 15:33:47 -0500
Message-Id: <199405112033.PAA16324@schoch.che.utexas.edu>
To: John Utz
cc: help-octave@che.utexas.edu
Subject: Re: sinc & compiled octave
In-reply-to: Your message of Wed, 11 May 94 13:13:11 PDT
Date: Wed, 11 May 94 15:33:47 EDT
From: John Eaton
Sender: help-octave-request@che.utexas.edu
John Utz wrote:
: What is the latest version Octave 0.* that compiles using gcc
: 2.4.5 OR the libg++ version earlier then 2.5.3?
Probably 0.79, because I made the changes to use template-based array
classes shortly after that (back in November of last year).
: As I have spent much bandwith on back and forth with JWE on, I
: can't get libg++-2.5.3 to compile on FreeBSD due to grave unhappiness
: occuring in streambuf,h
I hope that g++ 2.6.x will fix these problems, give us a working port
to the Alpha...
: ALSO, what am i missing out on running 0.73 as opposed to 1.0 ?
The NEWS file that's distributed with 1.0 (or, if you just want the
NEWS file, it's in /pub/octave/NEWS on ftp.che.utexas.edu) should list
most of the user-visible changes. Making a list of exactly which bugs
have been fixed might be a bit harder.
jwe
From help-octave-request@che.utexas.edu Wed May 11 19:20:47 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id TAA25495 for help-octave-outgoing; Wed, 11 May 1994 19:20:47 -0500
Received: from ljo-slip.DIALIN.CWRU.Edu (ljo-slip.DIALIN.CWRU.Edu [129.22.121.18]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id TAA25490 for ; Wed, 11 May 1994 19:20:44 -0500
Received: by ljo-slip.DIALIN.CWRU.Edu (8.6.8/1.34)
id VAA05034; Wed, 11 May 1994 21:24:27 -0400
Date: Wed, 11 May 1994 21:24:27 -0400
From: ljo@ljo-slip.DIALIN.CWRU.Edu (L Jonas Olsson)
Message-Id: <199405120124.VAA05034@ljo-slip.DIALIN.CWRU.Edu>
To: spaz@u.washington.edu
CC: help-octave@che.utexas.edu
In-reply-to: (message from John Utz on Wed, 11 May 1994 13:13:11 -0700 (PDT))
Subject: Re: sinc & compiled octave
Reply-to: ljo@po.cwru.edu
Sender: help-octave-request@che.utexas.edu
John,
I'm pretty sure that 0.79 is the last Octave that compiles with gcc-2.4.5
and FreeBSD's libg++. That's why that's the relase in FreeBSD's ports!
(It's not 0.73 as you said, it was upgraded several months ago)
I have not found any major bug in 0.79 yet, and am pretty happy with it
until we get some newer C++ compiler in FreeBSD.
Jonas
From help-octave-request@che.utexas.edu Thu May 12 01:26:30 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id BAA27125 for help-octave-outgoing; Thu, 12 May 1994 01:26:30 -0500
Received: from stein2.u.washington.edu (stein.u.washington.edu [140.142.56.2]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id BAA27120 for ; Thu, 12 May 1994 01:26:29 -0500
Received: by stein2.u.washington.edu
(5.65+UW94.4/UW-NDC Revision: 2.30 ) id AA20158;
Wed, 11 May 94 23:26:21 -0700
X-Sender: spaz@stein2.u.washington.edu
Date: Wed, 11 May 1994 23:26:20 -0700 (PDT)
From: John Utz
Subject: Re: sinc & compiled octave
To: ljo@po.cwru.edu
Cc: help-octave@che.utexas.edu
In-Reply-To: <199405120124.VAA05034@ljo-slip.DIALIN.CWRU.Edu>
Message-Id:
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: help-octave-request@che.utexas.edu
Hi Jonas!
On Wed, 11 May 1994, L Jonas Olsson wrote:
> John,
> I'm pretty sure that 0.79 is the last Octave that compiles with gcc-2.4.5
> and FreeBSD's libg++. That's why that's the relase in FreeBSD's ports!
> (It's not 0.73 as you said, it was upgraded several months ago)
>
> I have not found any major bug in 0.79 yet, and am pretty happy with it
> until we get some newer C++ compiler in FreeBSD.
>
> Jonas
>
I could be laboring under a major misunderstanding! but...
myname# ls /usr/gnu/lib/octave
0.74
the lib with the .m files in it calls itself 0.74. Is this just
due to the fact that the .m files did not change between 0.73 and 0.79?
thanks gang!
*******************************************************************************
John Utz spaz@stein.u.washington.edu
idiocy is the impulse function in the convolution of life
From help-octave-request@che.utexas.edu Thu May 12 01:51:18 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id BAA27278 for help-octave-outgoing; Thu, 12 May 1994 01:51:18 -0500
Received: from stein2.u.washington.edu (stein.u.washington.edu [140.142.56.2]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id BAA27272 for ; Thu, 12 May 1994 01:51:16 -0500
Received: by stein2.u.washington.edu
(5.65+UW94.4/UW-NDC Revision: 2.30 ) id AA23195;
Wed, 11 May 94 23:51:15 -0700
X-Sender: spaz@stein2.u.washington.edu
Date: Wed, 11 May 1994 23:51:15 -0700 (PDT)
From: John Utz
Subject: convolution
To: Help Octave
Message-Id:
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: help-octave-request@che.utexas.edu
Hi gang!
Given the sophistication of some of the sinc.m's i received
today, the tidbit i am about to offer up may wind up being the octave
equivalent of boiled water .... so bare with me and send me mail if you
all did this already :-)
I just finished up writing an m file for convolution. As I have
not looked at how anybody else has done it ( meaning, I did not copy the
matlab one! ). I would be happy to make it available.
The algorithm is frankly, wretched, ( i have not puzzled out the
growth rate yet other then to look at the algorithm and say to my self:
" yup, that is pretty bad! ") but it has the advantage of operating in
the manner that most people seem to use to think about convolution when
forced to work it out by hand.
So let me know if I have just reinvented the wheel!
thanks!
john
*******************************************************************************
John Utz spaz@stein.u.washington.edu
idiocy is the impulse function in the convolution of life
From help-octave-request@che.utexas.edu Mon May 16 12:16:50 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id MAA01546 for help-octave-outgoing; Mon, 16 May 1994 12:16:50 -0500
Received: from rrdbartok.nist.gov (rrdbartok.nist.gov [129.6.120.19]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id MAA01541 for ; Mon, 16 May 1994 12:16:48 -0500
Received: by rrdbartok.nist.gov (5.65/DEC-Ultrix/4.3)
id AA12430; Mon, 16 May 1994 13:18:06 -0400
Date: Mon, 16 May 1994 13:18:06 -0400
From: przemek@rrdbartok.nist.gov (Przemek Klosowski)
Message-Id: <9405161718.AA12430@rrdbartok.nist.gov>
To: help-octave@che.utexas.edu
Subject: Few questions (convolutions, 'mapping', linspace)
Sender: help-octave-request@che.utexas.edu
Hi,
I have a couple of questions that came in my recent using of Octave; I wonder
if anyone could help:
- I want to convolute the theoretical function S(Q,w) with the experimental
resolution r(w), to compare the resulting Sr(Q,w) with experimental data.
The formula is:
w0
/
Sr(Q,w) = | S(Q,w-v) r(v) dv
/
-w0
I was hoping to use the quad("fun",-w0,w0), where fun would be defined
as 'function y=fun(x); y=S(Q,w-x)*r(x); endfunction'. This didn't quite
work, as I need to access Q,w from within that function. I can't pass
them as parameters of fun() because quad() expects only one-parameter fun;
I couldn't figure the way to pass them as globals either.
- I often find myself defining a function (y=fun(x)), and hoping to be able
to 'map' (in the LISP sense) the vectors/matrices with this function, for
instance to plot it. The naive approach, y=f(x) for a vector/matrix 'x',
does not result in
y = [f(x(1)), f(x(2)), f(x(3)) ... f(x(N))],
which is fine because the arithmetic operators in the function definition
have meaning for matrices as well. For vector 'x' I can always do
for i=1:length(x); y(i)=f(x(i)); endfor
but I wonder if there is a neater, general way. I suppose I could be defining
my functions to do the explicitly recognize vector arguments, but
that still leaves the question whether I have to write explicit 'for' loops
or is there a better way.
- I noticed that the linspace operator is fairly slow: linspace(-1,1, 10000) takes
25 seconds on a 150MHz r4400, while the a=(0:.0001:1); is very quick, and the
FFT of the resulting matrix is only few seconds. What is the advantage of linspace
over the range operator, and why is it so slow?
Greetings
przemek
From help-octave-request@che.utexas.edu Mon May 16 13:30:12 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id NAA03190 for help-octave-outgoing; Mon, 16 May 1994 13:30:12 -0500
Received: from schoch.che.utexas.edu (schoch.che.utexas.edu [128.83.162.82]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id NAA03185 for ; Mon, 16 May 1994 13:30:11 -0500
Received: from localhost (jwe@localhost) by schoch.che.utexas.edu (8.6.8.1/8.6) with SMTP id NAA02255; Mon, 16 May 1994 13:30:02 -0500
Message-Id: <199405161830.NAA02255@schoch.che.utexas.edu>
To: przemek@rrdbartok.nist.gov (Przemek Klosowski)
cc: help-octave@che.utexas.edu
Subject: Re: Few questions (convolutions, 'mapping', linspace)
In-reply-to: Your message of Mon, 16 May 94 13:18:06 EDT
Date: Mon, 16 May 94 13:30:01 EDT
From: John Eaton
Sender: help-octave-request@che.utexas.edu
przemek@rrdbartok.nist.gov (Przemek Klosowski) wrote:
: - I noticed that the linspace operator is fairly slow:
: linspace(-1,1, 10000) takes 25 seconds on a 150MHz r4400, while
: the a=(0:.0001:1); is very quick, and the FFT of the resulting
: matrix is only few seconds. What is the advantage of linspace
: over the range operator, and why is it so slow?
The range operator is built-in, and in Octave it creates a special
range object that only contains the base, limit, and increment, so it
requires the same amount of work and storage to say
1:3:5
or
1:0.1:1e6
The linspace function is currently implemented as an external
function, and creates a matrix with a for loop:
delta = (x2 - x1) / (npoints - 1);
retval = zeros (1, npoints);
for i = 0:npoints-1
retval (i+1) = x1 + i * delta;
endfor
which is terribly inefficient. Changing it to
delta = (x2 - x1) / (npoints - 1);
retval = x1:delta:x2;
should not change the result and will speed things up considerably.
With this change, about the only advantage of the linspace function is
that you don't have to compute the increment yourself.
BTW, the loop in logspace() should probably also be replaced with
retval = 10 .^ retval;
Thanks for pointing this out.
jwe
From help-octave-request@che.utexas.edu Mon May 16 14:14:24 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id OAA04084 for help-octave-outgoing; Mon, 16 May 1994 14:14:24 -0500
Received: from schoch.che.utexas.edu (schoch.che.utexas.edu [128.83.162.82]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id OAA04079 for ; Mon, 16 May 1994 14:14:23 -0500
Received: from localhost (jwe@localhost) by schoch.che.utexas.edu (8.6.8.1/8.6) with SMTP id OAA02462; Mon, 16 May 1994 14:14:14 -0500
Message-Id: <199405161914.OAA02462@schoch.che.utexas.edu>
To: przemek@rrdbartok.nist.gov (Przemek Klosowski)
cc: help-octave@che.utexas.edu
Subject: Re: Few questions (convolutions, 'mapping', linspace)
In-reply-to: Your message of Mon, 16 May 94 13:18:06 EDT
Date: Mon, 16 May 94 14:14:13 EDT
From: John Eaton
Sender: help-octave-request@che.utexas.edu
przemek@rrdbartok.nist.gov (Przemek Klosowski) wrote:
: - I often find myself defining a function (y=fun(x)), and hoping to
: be able to 'map' (in the LISP sense) the vectors/matrices with
: this function, for instance to plot it.
Here's one way to do it, but it won't be very fast.
function y = map (f, x)
# Given a function y = f (x) that expects a scalar argument and
# produces a scalar result, call it for each element of the matrix x
# and return the corresponding matrix of values.
if (nargin != 2)
error ("usage: map (f, x)");
endif
if (! isstr (f))
error ("map: expecting string as first argument");
endif
[nr, nc] = size (x);
y = zeros (nr, nc);
for j = 1:nc
for i = 1:nr
y (i, j) = feval (f, x (i, j));
endfor
endfor
endfunction
It might be desirable to add this as a built-in function to speed it
up, but even then it won't be all that fast because it will require
multiple calls to a user-supplied function, which is fairly slow.
jwe
From help-octave-request@che.utexas.edu Mon May 16 14:31:42 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id OAA04469 for help-octave-outgoing; Mon, 16 May 1994 14:31:42 -0500
Received: from schoch.che.utexas.edu (schoch.che.utexas.edu [128.83.162.82]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id OAA04464 for ; Mon, 16 May 1994 14:31:41 -0500
Received: from localhost (jwe@localhost) by schoch.che.utexas.edu (8.6.8.1/8.6) with SMTP id OAA02558; Mon, 16 May 1994 14:31:32 -0500
Message-Id: <199405161931.OAA02558@schoch.che.utexas.edu>
To: przemek@rrdbartok.nist.gov (Przemek Klosowski)
cc: help-octave@che.utexas.edu
Subject: Re: Few questions (convolutions, 'mapping', linspace)
In-reply-to: Your message of Mon, 16 May 94 13:18:06 EDT
Date: Mon, 16 May 94 14:31:32 EDT
From: John Eaton
Sender: help-octave-request@che.utexas.edu
przemek@rrdbartok.nist.gov (Przemek Klosowski) wrote:
: - I want to convolute the theoretical function S(Q,w) with the experimental
: resolution r(w), to compare the resulting Sr(Q,w) with experimental data.
: The formula is:
: w0
: /
: Sr(Q,w) = | S(Q,w-v) r(v) dv
: /
: -w0
:
: I was hoping to use the quad("fun",-w0,w0), where fun would be defined
: as 'function y=fun(x); y=S(Q,w-x)*r(x); endfunction'. This didn't quite
: work, as I need to access Q,w from within that function. I can't pass
: them as parameters of fun() because quad() expects only one-parameter fun;
: I couldn't figure the way to pass them as globals either.
It should work to write
function y = S (Q, w, v)
y = ...
endfunction
function y = r (v)
y = ...
endfunction
global Q;
global w;
Q = ...
w = ...
function y = fun (x)
global Q;
global w;
y = S (Q, w-x) * r (x);
endfunction
w0 = ...
quad ("fun", -w0, w0)
If this fails, please send a complete bug report to bug-octave.
Thanks,
jwe
From help-octave-request@che.utexas.edu Fri May 20 01:09:39 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id BAA18343 for help-octave-outgoing; Fri, 20 May 1994 01:09:39 -0500
Received: from schoch.che.utexas.edu (schoch.che.utexas.edu [128.83.162.82]) by ward.che.utexas.edu (8.6.8.1/8.6) with ESMTP id BAA18338; Fri, 20 May 1994 01:09:38 -0500
Received: from localhost (jwe@localhost) by schoch.che.utexas.edu (8.6.8.1/8.6) with SMTP id BAA24485; Fri, 20 May 1994 01:09:37 -0500
Message-Id: <199405200609.BAA24485@schoch.che.utexas.edu>
To: help-octave
cc: jbraw, swinnea
Subject: short-circuit logical operators for Octave
Date: Fri, 20 May 1994 01:09:37 -0500
From: John Eaton
Sender: help-octave-request@che.utexas.edu
[This was also posted to comp.soft-sys.matlab, but I'm also posting
here since some people on this list may not read that newsgroup. --jwe]
Based on the discussion of the past few days in comp.soft-sys.matlab,
I've implemented short-circuit logical operators for Octave. An
experimental patch is available via anonymous ftp from
ftp.che.utexas.edu in the file /pub/octave/short-circuit-diffs. It
seems to work, but I have not done extensive testing.
The changes alter the behavior of Octave's logical `&&' and `||'
operators so that they are no longer simply different forms of the
logical `&' and `|' operators. Instead, they have the following
properties:
* The value of the expressions formed with these operators is either
1 (true) or 0 (false).
* The operands can be matrices, but an implicit all(all()) is
applied to each operand before it is used.
* Evaluation is performed in a short-circuit fashion.
a || b returns true if either a or b is determined to be true,
but only evaluates b if a is determined to be false.
a && b returns true if both a and b are determined to be true,
but only evaluates b if a is determined to be true.
* `&&' and `||' have the same precedence, now just below that
of `&' and `|'.
The behavior of the logical `&' and `|' operators is not changed.
These changes will probably break some of Octave's functions as they
are currently implemented because they use only the `&&' and `||'
forms, but some of the functions may actually need to use the `&' and
`|' operators. These problems will be fixed if this change is
adopted, but no patches are currently available. If you would like to
volunteer to help, please contact jwe@che.utexas.edu.
If you have other comments, suggestions, or bug reports, please send
them to jwe@che.utexas.edu as well.
Thanks,
--
Virtually all of the programs obtained by our sampling | John W. Eaton
procedure were written in FORTRAN. -- Donald E. Knuth | jwe@che.utexas.edu
From help-octave-request@che.utexas.edu Sat May 21 19:13:53 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id TAA16057 for help-octave-outgoing; Sat, 21 May 1994 19:13:53 -0500
Received: from stein3.u.washington.edu (stein.u.washington.edu [140.142.56.3]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id TAA16052 for ; Sat, 21 May 1994 19:13:52 -0500
Received: by stein3.u.washington.edu
(5.65+UW94.4/UW-NDC Revision: 2.30 ) id AA02299;
Sat, 21 May 94 17:13:51 -0700
X-Sender: spaz@stein3.u.washington.edu
Date: Sat, 21 May 1994 17:13:50 -0700 (PDT)
From: John Utz
Subject: plot blues
To: Help Octave
Message-Id:
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: help-octave-request@che.utexas.edu
Hi everybody!
Can anybody tell me what I am doing wrong here?:
octave:5> plot (fft(real(cos(0:1:16))))
gnuplot> plot "/var/tmp/tmp.d19569" title "line 1"
^
line 0: bad data on line 4
Help will be greatly appreciated!
tnx!
john
*******************************************************************************
John Utz spaz@stein.u.washington.edu
idiocy is the impulse function in the convolution of life
From help-octave-request@che.utexas.edu Sat May 21 19:41:51 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id TAA16231 for help-octave-outgoing; Sat, 21 May 1994 19:41:51 -0500
Received: from ljo-slip.DIALIN.CWRU.Edu (ljo-slip.DIALIN.CWRU.Edu [129.22.121.18]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id TAA16226 for ; Sat, 21 May 1994 19:41:48 -0500
Received: by ljo-slip.DIALIN.CWRU.Edu (8.6.8/1.34)
id VAA25595; Sat, 21 May 1994 21:33:08 -0400
Date: Sat, 21 May 1994 21:33:08 -0400
From: ljo@ljo-slip.DIALIN.CWRU.Edu (L Jonas Olsson)
Message-Id: <199405220133.VAA25595@ljo-slip.DIALIN.CWRU.Edu>
To: spaz@u.washington.edu
CC: help-octave@che.utexas.edu
In-reply-to: (message from John Utz on Sat, 21 May 1994 17:13:50 -0700 (PDT))
Subject: Re: plot blues
Reply-to: ljo@po.cwru.edu
Sender: help-octave-request@che.utexas.edu
You can try:
plot([imag(fft(real(cos(0:1:16)))); real(fft(real(cos(0:1:16))))]')
Not very elegant, but works.
Jonas
From help-octave-request@che.utexas.edu Sun May 22 01:32:01 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id BAA18488 for help-octave-outgoing; Sun, 22 May 1994 01:32:01 -0500
Received: from stein3.u.washington.edu (stein.u.washington.edu [140.142.56.3]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id BAA18483 for ; Sun, 22 May 1994 01:31:59 -0500
Received: by stein3.u.washington.edu
(5.65+UW94.4/UW-NDC Revision: 2.30 ) id AA13917;
Sat, 21 May 94 23:31:58 -0700
X-Sender: spaz@stein3.u.washington.edu
Date: Sat, 21 May 1994 23:31:58 -0700 (PDT)
From: John Utz
To: Help Octave
Message-Id:
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: help-octave-request@che.utexas.edu
Hi;
Why would x = [-pi: 0.01 :pi] give me a vector that works out to
a 45 degree angle line when it is plotted?
x =
Columns 1 through 5:
-3.0000e+00 -2.9900e+00 -2.9800e+00 -2.9700e+00 -2.9600e+00
Columns 6 through 10:
-2.9500e+00 -2.9400e+00 -2.9300e+00 -2.9200e+00 -2.9100e+00
Columns 11 through 15:
-2.9000e+00 -2.8900e+00 -2.8800e+00 -2.8700e+00 -2.8600e+00
I was really looking for a pulse!
thanks!
*******************************************************************************
John Utz spaz@stein.u.washington.edu
idiocy is the impulse function in the convolution of life
From help-octave-request@che.utexas.edu Sun May 22 08:51:19 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id IAA21094 for help-octave-outgoing; Sun, 22 May 1994 08:51:19 -0500
Received: from nessie.mcc.ac.uk (nessie.mcc.ac.uk [130.88.200.20]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id IAA21088; Sun, 22 May 1994 08:51:12 -0500
Message-Id: <199405221351.IAA21088@ward.che.utexas.edu>
Received: from mailhost.mcc.ac.uk by mailhost.mcc.ac.uk
id <29109-0@mailhost.mcc.ac.uk>; Sun, 22 May 1994 14:50:42 +0100
Subject: plot complex data
To: help-octave@che.utexas.edu
Date: Sun, 22 May 1994 14:50:38 +0100 (BST)
Cc: bug-octave@che.utexas.edu
X-Mailer: ELM [version 2.4 PL21]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 2470
From: Ted Harding
Sender: help-octave-request@che.utexas.edu
> Date: Sat, 21 May 1994 17:13:50 -0700 (PDT)
> From: John Utz
> Subject: plot blues
>
> Can anybody tell me what I am doing wrong here?:
> octave:5> plot (fft(real(cos(0:1:16))))
>
> gnuplot> plot "/var/tmp/tmp.d19569" title "line 1"
> ^
> line 0: bad data on line 4
----------------------------------------------------------------------------
> Date: Sat, 21 May 1994 21:33:08 -0400
> From: ljo@ljo-slip.DIALIN.CWRU.Edu (L Jonas Olsson)
>
> You can try:
>
> plot([imag(fft(real(cos(0:1:16)))); real(fft(real(cos(0:1:16))))]')
>
> Not very elegant, but works.
----------------------------------------------------------------------------
Actually, the real problem is a bug in plot_int.m
Try (A):
X=(cos(0:16) + i*sin(0:16))'; plot(X) --> "bad data in line 4"
But (B):
X=(cos(1:16) + i*sin(1:16))'; plot(X) --> Nice Plot! (x=Re, y=Im)
The reason is that in plot_int(x1,x2) the args are tested for real/complex
by "if imag(x1)" and the like. If ANY component of imag(x1)=0, test fails.
Hence (A) fails because sin(0)=0, but (B) works because no sin(1:16)=0.
PATCH: change the following in plot_int.m:
if (x1_i) ---> if any(x1_i)
if (imag (x1)) ---> if any(imag (x1))
if (imag (x2)) ---> if any(imag (x2))
and it works. Actually
plot(fft(cos(0:1:16)))
now looks rather pretty!.
Though this fixes this particular problem, the whole matter of octave "plot"
and its interface with gnuplot needs sorting out. There are other problems.
One is to do with the fact that, though gnuplot can calculate complex
expressions, it doesn't seem able to handle them for plotting.
E.g (in gnuplot)
j={0,1} (gnuplot's version of 0+1i)
plot [0:16] cos(x) + j*sin(x) [try it]
doesn't work, while
plot [0:16] real(cos(x)+j*sin(x)), imag(cos(x)+j*sin(x))
does.
Nor does gnuplot seem able to _read_ complex data: if "datafile" contains
{x1,y1}
{x2,y2}
...
you don't seem to be able to do anything sensible with it. Not that it
would matter, in octave, if you could, because when _octave_ sends
complex data to gnuplot the tmp/ datafile is in the format
(x1,y1)
(x2,y2)
...
which is NOT gnuplot complex number format (and is the immediate source
of the "bad data on line 4" messages). There are other problems too.
I'm looking into these, and will post any useful findings.
Ted Harding Ted.Harding@nessie.mcc.ac.uk
From help-octave-request@che.utexas.edu Sun May 22 22:22:17 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id WAA26340 for help-octave-outgoing; Sun, 22 May 1994 22:22:17 -0500
Received: from schoch.che.utexas.edu (schoch.che.utexas.edu [128.83.162.82]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id WAA26331; Sun, 22 May 1994 22:22:16 -0500
Received: from localhost (jwe@localhost) by schoch.che.utexas.edu (8.6.8.1/8.6) with SMTP id WAA04022; Sun, 22 May 1994 22:22:01 -0500
Message-Id: <199405230322.WAA04022@schoch.che.utexas.edu>
To: Ted Harding
cc: help-octave@che.utexas.edu, bug-octave@che.utexas.edu
Subject: Re: plot complex data
In-reply-to: Your message of Sun, 22 May 94 14:50:38 BST
Date: Sun, 22 May 94 22:22:01 EDT
From: John Eaton
Sender: help-octave-request@che.utexas.edu
Ted Harding wrote:
: Actually, the real problem is a bug in plot_int.m
Thanks. I've fixed this in my sources.
: Though this fixes this particular problem, the whole matter of
: octave "plot" and its interface with gnuplot needs sorting
: out. There are other problems.
Please send bug reports for any other problems you find.
Thanks,
jwe
From help-octave-request@che.utexas.edu Wed May 25 04:49:04 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id EAA06200 for help-octave-outgoing; Wed, 25 May 1994 04:49:04 -0500
Received: from schoch.che.utexas.edu (schoch.che.utexas.edu [128.83.162.82]) by ward.che.utexas.edu (8.6.8.1/8.6) with ESMTP id EAA06195; Wed, 25 May 1994 04:49:02 -0500
Received: from localhost (jwe@localhost) by schoch.che.utexas.edu (8.6.8.1/8.6) with SMTP id EAA25674; Wed, 25 May 1994 04:49:01 -0500
Message-Id: <199405250949.EAA25674@schoch.che.utexas.edu>
To: help-octave
cc: jbraw, swinnea
Subject: Looking for volunteers
Date: Wed, 25 May 1994 04:49:00 -0500
From: John Eaton
Sender: help-octave-request@che.utexas.edu
I am looking for people interested in testing pre-release versions of
Octave.
Binary distributions of the pre-release snapshots won't be available,
so you will need to be able to build Octave from sources.
It will be helpful to have some hardware and operating system
combination other than the following
DECstation Ultrix 4.2a
SPARCstation SunOS 4.1.2
RS/6000 AIX 3.2.5
DEC Alpha OSF/1 1.3
because I already have convenient access to these.
It will also eventually be helpful if you can install DejaGNU to run
the Octave tests, but that is not really important now because there
aren't very many tests anyway. (Of course, any help writing new or
better tests would be greatly appreciated... :-)
For more info, please contact jwe@che.utexas.edu.
Thanks,
jwe
From help-octave-request@che.utexas.edu Wed May 25 06:42:38 1994
Received: (daemon@localhost) by ward.che.utexas.edu (8.6.8.1/8.6) id GAA07508 for help-octave-outgoing; Wed, 25 May 1994 06:42:38 -0500
Received: from crdems.ge.com (crdems.GE.COM [192.35.44.5]) by ward.che.utexas.edu (8.6.8.1/8.6) with SMTP id GAA07503; Wed, 25 May 1994 06:42:36 -0500
Received: from c0228.ae.ge.com by crdems.ge.com (5.65/GE 1.77) id AA22345; Wed, 25 May 94 07:38:56 -0400
Message-Id: <9405251138.AA22345@crdems.ge.com>
Received: from c0230.ae.ge.com by c0228.ae.ge.com with SMTP(1.37.187.4/15.6) id AA02718; Wed, 25 May 94 07:39:00 -0400
Received: by c0230.ae.ge.com(1.38.193.3/16.2) id AA08380; Wed, 25 May 94 07:40:37 -0400
Date: Wed, 25 May 94 07:40:37 -0400
From: U-E59264-Osman Buyukisik
To: jwe@che.utexas.edu
Cc: help-octave@che.utexas.edu, jbraw@che.utexas.edu, swinnea@che.utexas.edu
In-Reply-To: <199405250949.EAA25674@schoch.che.utexas.edu> (message from John Eaton on Wed, 25 May 1994 04:49:00 -0500)
Subject: Re: Looking for volunteers
Sender: help-octave-request@che.utexas.edu
Hi John,
I have an HP710 with HPUX9.03 32MB ram. I have built version 1.0 and
seems to be working ok. I could time permitting do some tests. I dont
have DejaGNU. I will check it out to see if I can install it.
regards,
Osman
------------------------------------------------------------------------------
- Osman F. Buyukisik
- Senior Engineer, Mechanical Analysis C/A
- GE Aircraft Engines
- One Neumann Way, MD E171
- Cincinnati, OH 45215
- Tel: 513-243-4282 Fax:513-786-1171
- Email: buyukisik_osman@ae.ge.com
------------------------------------------------------------------------------