Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: Matrix display in GUI

Subject: Matrix display in GUI

From: viper viper

Date: 13 Jun, 2008 15:13:01

Message: 1 of 4

Is it possible to display the matrix of any size in text
field or edit field???????

Subject: Matrix display in GUI

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 13 Jun, 2008 18:22:03

Message: 2 of 4

In article <g2u2pt$dfg$1@fred.mathworks.com>,
viper viper <zio_nneo@hotmail.com> wrote:
>Is it possible to display the matrix of any size in text
>field or edit field???????

No. Eventually you will run out of memory. Even sooner, though,
you will run out of screen space. (Text uicontrols do not put up
scrollbars; edit uicontrols put up scrollbars, but only vertially,
wrapping the text horizonatally.)

Matlab takes a long time to render even relatively modest sized
matrices, such as

uicontrol('Style','text','String', num2str(rand(5000,5000)))

Several minutes so far...
--
  "To burn always with this hard, gem-like flame, to maintain this
  ecstasy, is success in life." -- Walter Pater

Subject: Matrix display in GUI

From: Matt Fig

Date: 13 Jun, 2008 19:27:02

Message: 3 of 4

While it won't work for 'any size,' if your matrix is small
enough and you have an axes in the GUI you could do
something like this:


n = 17; % The size of the matrix.
a = round(rand(n)*20); % Create the matrix.
conv = repmat('%02d ',1,n); % String converter.
txt = sprintf([conv,'\n'],a'); % Text to print.
tw = text(.01,.5,txt); % Print the text.
set(gca,'xtick',[]);
set(gca,'ytick',[]);

Subject: Matrix display in GUI

From: helper

Date: 13 Jun, 2008 23:35:03

Message: 4 of 4

"viper viper" <zio_nneo@hotmail.com> wrote in message
<g2u2pt$dfg$1@fred.mathworks.com>...
> Is it possible to display the matrix of any size in text
> field or edit field???????

You might want to look into using a UITABLE.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics