Comments for Undocumented Matlab Charting Matlab's unsupported hidden underbelly Fri, 26 May 2017 20:22:05 +0000 hourly 1 Comment on Uicontrol callbacks by Noah Fri, 26 May 2017 20:22:05 +0000 Yair,

Is there a generic way to pass a Matlab method to Java (that Java can execute) without having to use JFrame?

classdef HelloWorld
      function this = HelloWorld()
        %Pass HelloWorld.jar main entry point HellowWorld callback method
        a = HelloWorld;
        %Notional (here main is any HelloWorld class method, not limited to a JFrame callback)
      function callback(parm1, parm2,...)

If this is do-able I’d be willing to donate numerous coffee’s :)

Thanks in advance,

Comment on treeTable by ss Thu, 25 May 2017 12:40:13 +0000 I can edit by a double-click even the column is non-editable . I don’t know what happened

Comment on The javacomponent function by Yair Altman Wed, 24 May 2017 09:45:41 +0000 @johanes – you can do this:

set([guiel.elementA, guiel.elementB], 'Font', newFont2);
Comment on treeTable by ss Wed, 24 May 2017 01:08:45 +0000 Hi,Yair

I have a question how to add a column button to the treetable

Comment on The javacomponent function by Johannes Tue, 23 May 2017 09:39:56 +0000 Dear Yair,

I have one question: Would it be possible to set certain properties of elements (e.g. Text-Font or BackgroundColor) at once?
Right now I use to following scheme for that:

guiel.elementA(1) = javacomponent('javax.swing.JLabel', [0 0 1 1], 'Parent'); 
guiel.elementA(2) = javacomponent('javax.swing.JLabel', [0 0 1 1], 'Parent'); 
guiel.elementA(3) = javacomponent('javax.swing.JLabel', [0 0 1 1], 'Parent'); 
guiel.elementB(1) = javacomponent('javax.swing.JLabel', [0 0 1 1], 'Parent'); 
guiel.elementB(2) = javacomponent('javax.swing.JLabel', [0 0 1 1], 'Parent'); 
guiel.elementB(3) = javacomponent('javax.swing.JLabel', [0 0 1 1], 'Parent'); 
newFont2 = java.awt.Font('Helvetica', java.awt.Font.PLAIN, 13);

Thank you very much!

Comment on Customizing uifigures part 2 by Felix Tue, 23 May 2017 07:56:13 +0000 Hello Iliya & Yair,

did you already try it in R2017a?

It seems that the ‘Container’ property of the figure controler is not longer available.

Comment on Preallocation performance by 变量出现在每个循环迭代的大小改变-什么? – CodingBlog Sun, 21 May 2017 15:00:55 +0000 […] Preallocation performance […]

Comment on Reading non-Latin text files by Yair Altman Sun, 21 May 2017 12:36:49 +0000 Try to place this command in a startup.m file in your code folder, and then recompile your application. I’m not sure it will help, but it’s worth a try.

Comment on Reading non-Latin text files by Nir Sun, 21 May 2017 11:59:16 +0000 Do you know how can I change character encoding from within a compiled code.

ie. set_param(0, ‘CharacterEncoding’, ‘ISO_8859-8’) could not be added to the matlab compiled exe file.


Comment on Explicit multi-threading in Matlab part 1 by JoeV Thu, 18 May 2017 18:41:33 +0000 It appears the MatlabControl project has been migrated to GitHub (due to Google Code shutting down):

Documentation at the Wiki:

Comment on Plot LineSmoothing property by Naeem Ullah Wed, 17 May 2017 20:27:10 +0000 Line smoothing is very helpful for me. Thank you

Comment on Uitable sorting by didi Sat, 13 May 2017 16:55:46 +0000 Thank! It’s helped me a lot!

Comment on Undocumented feature() function by Erivelton Geraldo Nepomuceno Fri, 12 May 2017 17:04:21 +0000 Hi,

system_dep​endent(‘se​tround’,In​f) is still working on R2017a? Anyone has noticed something different? In previous version, I didn’t find any problem.

Comment on Customizing uifigures part 1 by Davide Miani Thu, 11 May 2017 22:40:00 +0000 Update: if you are running MATLAB 2017a, you can reach the FCE properties in this way:

warning off MATLAB:structOnObject
figProps = struct(app.UIFigure);
controller = figProps.Controller;
controllerProps = struct(controller);
platformHost = controllerProps.PlatformHost;
platformHostProps = struct(platformHost);
win = platformHostProps.CEF;

Enjoy hacking AppDesigner 😉

Comment on Uitable sorting by Yair Altman Wed, 10 May 2017 11:18:01 +0000 jtable.getSortedRowAt(rowIndex) returns the display row index for a specified data model row;
jtable.getActualRowAt(rowIndex) returns the data model row index for a specified display row.

Comment on Uitable sorting by Jack Wed, 10 May 2017 10:26:34 +0000 Hi Yair

Thank you very much for your answer.
Can you explain me please what is the meaning of the index that getSortedRowAt is returning? I noticed it is’nt the row index before the table sorted.


Comment on Uitable sorting by Yair Altman Wed, 10 May 2017 08:24:04 +0000 @shi – this is an unhandled case in the ColoredFieldCellRenderer code. You have the source code for this class – it is quite simple and you can modify it in a which that will handle sorted data rows.

Comment on Uitable sorting by Yair Altman Wed, 10 May 2017 08:19:28 +0000 @Jack – sorting only affects the way that the table-model data is displayed, it does not affect the data itself. You can get the model-to-view mapping using this:

displayedRowIndex = jtable.getSortedRowAt(modelRowIndex-1) + 1;

Note that java indices start at 0 (not 1 as in Matlab), hence the need for the -1 and +1 in the code snippet above.
When the table is not sorted, displayedRowIndex will be the same as modelRowIndex; when sorted it will return a different index.

Comment on Uitable sorting by Jack Wed, 10 May 2017 01:04:39 +0000 Hi Yair

How can I make the table.Data to be update after i’m sorting a table as like as you described above?
Because I noticed that after i’m sorting a table the table.Data remains the same as before i sorted the table and actually disconnect what the table showing to the user.



Comment on Speeding up Matlab-JDBC SQL queries by Paul Mon, 08 May 2017 23:19:17 +0000 Hey there,

just wanted to say thank you for this page. I found a lot of valuable information here how to handle result sets from java in matlab.

Best Regards