[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cell-array display in class
From: |
Colin Macdonald |
Subject: |
Re: cell-array display in class |
Date: |
Wed, 29 Apr 2015 22:44:34 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 29/04/15 22:38, Colin Macdonald wrote:
On 27/04/15 07:04, Oliver Heimlich wrote:
Second, you want to get access to the following variable (in ov-base.cc)
to correctly indent your output. I think there currently is no way to
access this value from within a m-file display method (unless you use an
oct-file kludge).
int octave_base_value::curr_print_indent_level
Yes, that is unfortunate :( I'm sure I have other things I should be
worrying about but perhaps Octave could pass to us the current indent
level as 2nd argument of display. Thoughts?
In case this is interesting to others, I currently have the following
display in pure .m, which is good but for the indenting:
>> C
C =
{
[1,1] = 1
[2,1] = (sym) x
[3,1] = (symfun) f(x)
[1,2] = 2
[2,2] =
{
[1,1] = 42
[1,2] = (sym) x
[1,3] = (sym) 2⋅x
[1,4] = 42
}
[3,2] = (sym 2×2 matrix)
⎡1 x⎤
⎢ ⎥
⎢ π⎥
⎢x ─⎥
⎣ 2⎦
}
and of course this would be nicer:
>> C
C =
{
[1,1] = 1
[2,1] = (sym) x
[3,1] = (symfun) f(x)
[1,2] = 2
[2,2] =
{
[1,1] = 42
[1,2] = (sym) x
[1,3] = (sym) 2⋅x
[1,4] = 42
}
[3,2] = (sym 2×2 matrix)
⎡1 x⎤
⎢ ⎥
⎢ π⎥
⎢x ─⎥
⎣ 2⎦
}
- cell-array display in class, Colin Macdonald, 2015/04/26
- Re: cell-array display in class, Oliver Heimlich, 2015/04/27
- Re: cell-array display in class, Oliver Heimlich, 2015/04/27
- Re: cell-array display in class, Colin Macdonald, 2015/04/29
- Re: cell-array display in class,
Colin Macdonald <=
- Re: cell-array display in class, Oliver Heimlich, 2015/04/30
- Re: cell-array display in class, Colin Macdonald, 2015/04/30
- Re: cell-array display in class, Colin Macdonald, 2015/04/30
- Re: cell-array display in class, Oliver Heimlich, 2015/04/30