Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
copy paste from uitable is incomplete

Subject: copy paste from uitable is incomplete

From: Thomas Otterstätter

Date: 9 Feb, 2012 11:01:13

Message: 1 of 5

Hy everyone,

I am using Matlab 2011b and I experience some difficulties with uitable and copy/paste operations (also tested with 2011a).

If I create a uitable that contains more than just a few rows or columns and then use ctrl-a and ctrl-c to copy all the data and paste it somewhere else (excel, notepad,...) it is incomplete.
Usually there are some rows/columns/fields missing somewhere in between.
For the same copy procedure always the same data is missing (so paste works fine).
For different copy procedures different data is missing.

...something like the following should do the job...
uitable('data',rand(400,2))
click on cell
ctrl-a
ctrl-c
paste somewhere

Does anyone experience the same problem or has anyone any sugestions to fix this?

Thanks
Thomas

Subject: copy paste from uitable is incomplete

From: David

Date: 17 Apr, 2012 20:35:14

Message: 2 of 5

Hi,

I am having the same problem. When I copy directly from the table and paste anywhere else, including into a matlab matrix, the paste results are always full of gaps unless. Let me qualify this by saying that there seems to be no problem if the copy/paste data is relatively small (<100 elements). However, my uitables routinely have thousands of elements, so this issue presents a significant impediment on my GUI.

David

"Thomas Otterstätter" wrote in message <jh091o$8td$1@newscl01ah.mathworks.com>...
> Hy everyone,
>
> I am using Matlab 2011b and I experience some difficulties with uitable and copy/paste operations (also tested with 2011a).
>
> If I create a uitable that contains more than just a few rows or columns and then use ctrl-a and ctrl-c to copy all the data and paste it somewhere else (excel, notepad,...) it is incomplete.
> Usually there are some rows/columns/fields missing somewhere in between.
> For the same copy procedure always the same data is missing (so paste works fine).
> For different copy procedures different data is missing.
>
> ...something like the following should do the job...
> uitable('data',rand(400,2))
> click on cell
> ctrl-a
> ctrl-c
> paste somewhere
>
> Does anyone experience the same problem or has anyone any sugestions to fix this?
>
> Thanks
> Thomas

Subject: copy paste from uitable is incomplete

From: Thomas Otterstaetter

Date: 18 Apr, 2012 05:51:06

Message: 3 of 5

Hi David,

sadly still no solution from my side.

Thomas

"David " <dds6@pitt.edu> wrote in message <jmkk62$1jv$1@newscl01ah.mathworks.com>...
> Hi,
>
> I am having the same problem. When I copy directly from the table and paste anywhere else, including into a matlab matrix, the paste results are always full of gaps unless. Let me qualify this by saying that there seems to be no problem if the copy/paste data is relatively small (<100 elements). However, my uitables routinely have thousands of elements, so this issue presents a significant impediment on my GUI.
>
> David
>
> "Thomas Otterstätter" wrote in message <jh091o$8td$1@newscl01ah.mathworks.com>...
> > Hy everyone,
> >
> > I am using Matlab 2011b and I experience some difficulties with uitable and copy/paste operations (also tested with 2011a).
> >
> > If I create a uitable that contains more than just a few rows or columns and then use ctrl-a and ctrl-c to copy all the data and paste it somewhere else (excel, notepad,...) it is incomplete.
> > Usually there are some rows/columns/fields missing somewhere in between.
> > For the same copy procedure always the same data is missing (so paste works fine).
> > For different copy procedures different data is missing.
> >
> > ...something like the following should do the job...
> > uitable('data',rand(400,2))
> > click on cell
> > ctrl-a
> > ctrl-c
> > paste somewhere
> >
> > Does anyone experience the same problem or has anyone any sugestions to fix this?
> >
> > Thanks
> > Thomas

Subject: copy paste from uitable is incomplete

From: Yair Altman

Date: 18 Apr, 2012 08:50:08

Message: 4 of 5

"David " <dds6@pitt.edu> wrote in message <jmkk62$1jv$1@newscl01ah.mathworks.com>...
> Hi,
>
> I am having the same problem. When I copy directly from the table and paste anywhere else, including into a matlab matrix, the paste results are always full of gaps unless. Let me qualify this by saying that there seems to be no problem if the copy/paste data is relatively small (<100 elements). However, my uitables routinely have thousands of elements, so this issue presents a significant impediment on my GUI.


This may be a timing (EDT) issue - it takes Matlab a long time to process so many data cells and this is not yet completed by the time you paste.

Either wait a bit more time before pasting, or use a lighter data table than Matlab's uitable: the current uitable is extremely inefficient in the way that it stores data. Each table cell is a complex object that needs to pass through endless checks and transformations when it is processed. This is also why uitable is so slow to display and update when you have thousands of data values. Instead, try using the old uitable (with the 'v0' parameter) or even a simple Java JTable - these are much more efficient and copying from them should work better.

Yair Altman
http://UndocumentedMatlab.com
Read my Matlab-Java Programming book
 

Subject: copy paste from uitable is incomplete

From: Thomas Otterstaetter

Date: 18 Apr, 2012 14:58:05

Message: 5 of 5

Hi Yair,

thanks for the advice(s).

Both suggestions seem to work.
Waiting for an unknown amount of time is not the ideal solution but it proofs your point.
So for my part I'll probably try to implement the old version of uitable.

And by the way - also thanks for some other features I explored due to your website - amazing work!

Thomas


"Yair Altman" wrote in message <jmlv80$rul$1@newscl01ah.mathworks.com>...
> "David " <dds6@pitt.edu> wrote in message <jmkk62$1jv$1@newscl01ah.mathworks.com>...
> > Hi,
> >
> > I am having the same problem. When I copy directly from the table and paste anywhere else, including into a matlab matrix, the paste results are always full of gaps unless. Let me qualify this by saying that there seems to be no problem if the copy/paste data is relatively small (<100 elements). However, my uitables routinely have thousands of elements, so this issue presents a significant impediment on my GUI.
>
>
> This may be a timing (EDT) issue - it takes Matlab a long time to process so many data cells and this is not yet completed by the time you paste.
>
> Either wait a bit more time before pasting, or use a lighter data table than Matlab's uitable: the current uitable is extremely inefficient in the way that it stores data. Each table cell is a complex object that needs to pass through endless checks and transformations when it is processed. This is also why uitable is so slow to display and update when you have thousands of data values. Instead, try using the old uitable (with the 'v0' parameter) or even a simple Java JTable - these are much more efficient and copying from them should work better.
>
> Yair Altman
> http://UndocumentedMatlab.com
> Read my Matlab-Java Programming book
>

Tags for this Thread

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.

Contact us