help-octave
[Top][All Lists]
Advanced

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

Re: arugments, more


From: Joao Cardoso
Subject: Re: arugments, more
Date: Thu, 18 Mar 1999 20:27:50 +0000

Daniel Heiserer wrote:
> 
> 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?

fflush(stdout) after each printf() (make shure it finish with '\n')

or/and

'more off' at the command level

> 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.

I guess that you have to live with it... whether you like it or not :-)

> 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
> mailto:address@hidden

-- 
Joao Cardoso                |   e-mail: address@hidden
INESC, R. Jose Falcao 110   |   tel:    + 351 2 2094322
4050 Porto, Portugal        |   fax:    + 351 2 2008487



reply via email to

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