octave-maintainers
[Top][All Lists]
Advanced

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

Re: Understanding how octave displays arrays


From: Corbin Champion
Subject: Re: Understanding how octave displays arrays
Date: Mon, 9 Apr 2012 16:39:38 -0700


On Mon, Apr 9, 2012 at 4:06 PM, Corbin Champion <address@hidden> wrote:
I have a largely working port of Octave for Android.  One of the key problems I would like to fix before doing an initial release relates to how octave displays large variables.  Currently, if I do x=1:4, it displays fine.  If instead, I do x=1:1000, nothing is displayed.  I know that Octave providing paging functionality like more when display large sets of data (very useful).  So,

1) Where is the code that determines how to display variables?
2) Is there a way to turn off this capability, so it just displays the whole variable regardless of how big it is?  This is a temporary solution.  A source code change would be acceptable.
3) Originally, I thought the solution was to tell octave some information about my screen.  I hacked display.cc to do something like:

#if defined __ANDROID__
      //just a swag for now
      dp = 16;

      //my screen is 800x400
      ht = 800;
      wd = 400;

      //my screen is 4.5inches x 2.5inches
      double ht_mm = 4.5 * 25.4;
      double wd_mm = 2.5 * 25.4;

      rx = wd * 25.4 / wd_mm;
      ry = ht * 25.4 / ht_mm;

Which is not ideal for all screen sizes (I can improve that, once I get a basic example working), but should represent the size of my screen well enough, but this resulted in nothing being printed out.  Another interesting thing to note is I am communicating with Octave through a psudo-terminal, it is tty, but maybe that impacts things?

Any suggestions along the lines of a more permanent solution to this?

Thanks,
Corbin

Looks like the answer for the short term is use:

more off

always find the answer, shortly after I send the question, sorry!  Asking the question always seems to make me think more clearly about the problem. 

For the long term, is it that octave actually uses more?  If so, that is probably the issue as Android doesn't support most shell commands including more.  Has anyone created a built-in version of more like functionality for other systems (Is my issue unique?)?  What source file is this all handled in?

Thanks,
Corbin

reply via email to

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