octave-maintainers
[Top][All Lists]
Advanced

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

Understanding how octave displays arrays


From: Corbin Champion
Subject: Understanding how octave displays arrays
Date: Mon, 9 Apr 2012 16:06:27 -0700

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

reply via email to

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