help-octave
[Top][All Lists]

## arugments, more

 From: Daniel Heiserer Subject: arugments, more Date: Thu, 18 Mar 1999 19:04:23 +0100

```Hi,

1) small thing:
I have a loop:
for j=1:100
printf("I am at step %d",j);
do_some_stuff
end

I would like that he printf's at each step he encounters printf.
Currently he flushes the port, when he did the for loop, but I want
to know where he is, so I need something like a flush=always or so?
Does such thing exist? Which way exists?

2) big thing:
I have a big problem:

I have a function partn:
[a11,a12,a21,a22]=partn(A,cp,rp)
To partition [A] into [A11], [A12], [A21] and [A22]

returning 4 arguments IF requested.

I want to return the arguments to reduce_ii

B=reduce_ii(partn(A,cp,rp));

function B=reduce_ii(a11,a12,a21,a22);

reduce_ii NEEDS 4 arguments otherwise it is dead.

The thing is if I write
reduce_ii(partn(A,cp,rp))

partn gives only back ONE argument instead of the 4 I need.
(matlab does the same). :-((

For that case I NEED 4 arguments.

I know I can write something like:
[a11,a12,a21,a22]=partn(A,cp,rp)
B=reduce_ii(a11,a12,a21,a22);
But I would like it in ONE step.
Is there a way?

Bye daniel

Mit freundlichen Gruessen
Daniel Heiserer
-----
--------------------------------------------------------------
Dipl.-Phys. Daniel Heiserer, BMW AG, Knorrstrasse 147, 80788 Muenchen
Abteilung EK-20
Tel.: 089-382-21187, Fax.: 089-382-42820