octave-maintainers
[Top][All Lists]
Advanced

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

Re: pretty print in Octave


From: Carnë Draug
Subject: Re: pretty print in Octave
Date: Thu, 4 Jul 2013 20:51:36 +0100

On 4 July 2013 01:03, Michael D. Godfrey <address@hidden> wrote:
> On 07/03/2013 02:51 PM, John W. Eaton wrote:
>
>> On 07/03/2013 02:43 PM, Carnė Draug wrote:
>>>
>>> Hi
>>>
>>> I'm at the moment in need of some code to pretty print some tables to
>>> Octave prompt, something like what `pkg list` is currently doing.
>>> `whos' also prints a nice table but a different one and maybe there's
>>> other examples but I can't think of one right now. I'm not aware of
>>> any function to make such tables, and seems like Matlab doesn't have
>>> one.
>>>
>>> Would you guys think a general purpose pretty print function would be
>>> useful? And if so, anyone has any tips on what would be a good API
>>> example to follow?
>>
>>
>> Does the function list_in_columns help, or do you need variable-width
>> columns?
>>
>> jwe
>
> TeX or LaTeX do this job and much more, and they are already in use in
> Octave.
>
> Michael

I don't understand your suggestion. I meant to generate an ASCII table
at the prompt. Something very similar to what whos() and pkg list
does.

Anyway, my question was if I should bother to write a general purpose
function for this but I'm guessing it's not worth it. The more I think
about it, the more I realize that there's too many cases and so, such
function would either have a very complicated API (to cover all
cases), or require a lot of data reshaping. All in all, it would
destroy the whole point of it which would be to simplify things. I'll
just write my own much simpler code to the exact case I have in hands
(the nice formatted table that imformats needs to display in the
console).

On 4 July 2013 10:40, Richard Crozier <address@hidden> wrote:
> Is the attached function any use?

For my case not really since the data is in a struct array and each
field has its own data type. But thank you anyway.

Carnë


reply via email to

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