Quantcast

Re: evalc

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: evalc

Rik-4
On 03/24/2013 09:56 AM, [hidden email] wrote:

> Message: 4
> Date: Sun, 24 Mar 2013 08:47:18 -0700 (PDT)
> From: Julien Bect <[hidden email]>
> To: [hidden email]
> Subject: Re: Core Functions and Matlab Compatibility
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=us-ascii
>
> Rik wrote that :
>
>> > The following have an implementation on Octave-Forge:
>> >
>> > gsvd
>> > condeig
>> > expint
>> > erfcinv
>> > ellipj
>> > ellipke
>> > funm
>> > evalc (should be trivial to capture stdout)
> Hello all,
>
> I'm bringing this thread back to life because I just found it while looking
> for information about the (apparently unimplemented) function evalc()...
>
> In the quoted message, Rik says that an implementation of evalc() exists
> somewhere on Octave-forge, but I don't see it here :
>
> http://octave.sourceforge.net/functions_by_alpha.php?letter=E
>
> Does anybody know where I can find it ?
3/25/13

Julien,

I don't think it exists yet.  My comment (should be trivial to capture
stdout) indicates to me that I saw this as a very straightforward extension
of eval.

Matlab describes evalc as

"T = evalc(S) is the same as eval(S) except that anything that would
normally be written to the command window, except for error messages, is
captured and returned in the character array T (lines in T are separated by
\n characters). "

So I think an m-file could be written that wraps around eval and
temporarily redirects stdout to a file which could then be read into [T].

--Rik

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: evalc

Julien Bect
On 25/03/2013 16:57, Rik wrote:

> On 03/24/2013 09:56 AM, [hidden email] wrote:
>> From: Julien Bect <[hidden email]>
>>
>> Rik wrote that :
>>>> evalc (should be trivial to capture stdout)
>> Hello all,
>>
>> I'm bringing this thread back to life because I just found it while looking
>> for information about the (apparently unimplemented) function evalc()...
>>
>> In the quoted message, Rik says that an implementation of evalc() exists
>> somewhere on Octave-forge, but I don't see it here :
>>
>> http://octave.sourceforge.net/functions_by_alpha.php?letter=E
>>
>> Does anybody know where I can find it ?
> 3/25/13
>
> Julien,
>
> I don't think it exists yet.  My comment (should be trivial to capture
> stdout) indicates to me that I saw this as a very straightforward extension
> of eval.
>
> Matlab describes evalc as
>
> "T = evalc(S) is the same as eval(S) except that anything that would
> normally be written to the command window, except for error messages, is
> captured and returned in the character array T (lines in T are separated by
> \n characters). "
>
> So I think an m-file could be written that wraps around eval and
> temporarily redirects stdout to a file which could then be read into [T].

How would you do that in an m-file ? Using PAGER() ?

How about hacking octave_pager_stream directly (changing its rdbuf) ?


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: evalc

Julien Bect
On 27/03/2013 15:02, Julien Bect wrote:

> On 25/03/2013 16:57, Rik wrote:
>> Matlab describes evalc as
>>
>> "T = evalc(S) is the same as eval(S) except that anything that would
>> normally be written to the command window, except for error messages, is
>> captured and returned in the character array T (lines in T are
>> separated by
>> \n characters). "
>>
>> So I think an m-file could be written that wraps around eval and
>> temporarily redirects stdout to a file which could then be read into
>> [T].
>
> How would you do that in an m-file ? Using PAGER() ?
>
> How about hacking octave_pager_stream directly (changing its rdbuf) ?

I have almost have a working implementation of evalc() now, following
the second approach (hacking octave_pager_stream).

Since evalc() is an unimplemented Matlab function, I assume that this
should be filed using a bug report ?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: evalc

Rik-4
In reply to this post by Rik-4
On 03/28/2013 04:41 AM, [hidden email] wrote:

> Message: 5
> Date: Thu, 28 Mar 2013 09:26:15 +0100
> From: Julien Bect <[hidden email]>
> To: [hidden email]
> Subject: Re: evalc
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 27/03/2013 15:02, Julien Bect wrote:
>> > On 25/03/2013 16:57, Rik wrote:
>>> >> Matlab describes evalc as
>>> >>
>>> >> "T = evalc(S) is the same as eval(S) except that anything that would
>>> >> normally be written to the command window, except for error messages, is
>>> >> captured and returned in the character array T (lines in T are
>>> >> separated by
>>> >> \n characters). "
>>> >>
>>> >> So I think an m-file could be written that wraps around eval and
>>> >> temporarily redirects stdout to a file which could then be read into
>>> >> [T].
>> >
>> > How would you do that in an m-file ? Using PAGER() ?
>> >
>> > How about hacking octave_pager_stream directly (changing its rdbuf) ?
> I have almost have a working implementation of evalc() now, following
> the second approach (hacking octave_pager_stream).
>
> Since evalc() is an unimplemented Matlab function, I assume that this
> should be filed using a bug report ?
3/28/13

Julien,

Actually, if you have a patch that will implement it you should attach it
to the patch tracker which is a separate list on the Octave savannah
website (https://savannah.gnu.org/patch/?group=octave).

--Rik
Loading...