Comments for Undocumented Matlab http://undocumentedmatlab.com Charting Matlab's unsupported hidden underbelly Fri, 26 May 2017 20:22:05 +0000 hourly 1 https://wordpress.org/?v=4.4.1 Comment on Uicontrol callbacks by Noahhttp://undocumentedmatlab.com/blog/uicontrol-callbacks#comment-407407 Fri, 26 May 2017 20:22:05 +0000 http://undocumentedmatlab.com/?p=223#comment-407407 Yair,

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

classdef HelloWorld
   method
      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)
        set(a,'main',{@this.callback,parm1,parm2,...})
      end
   end
   method
      function callback(parm1, parm2,...)
         ...
      end
   end
end

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

Thanks in advance,
Noah

]]>
Comment on treeTable by sshttp://undocumentedmatlab.com/blog/treetable#comment-407325 Thu, 25 May 2017 12:40:13 +0000 http://undocumentedmatlab.com/?p=4062#comment-407325 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 Altmanhttp://undocumentedmatlab.com/blog/javacomponent#comment-407274 Wed, 24 May 2017 09:45:41 +0000 http://undocumentedmatlab.com/?p=1793#comment-407274 @johanes – you can do this:

set([guiel.elementA, guiel.elementB], 'Font', newFont2);
]]>
Comment on treeTable by sshttp://undocumentedmatlab.com/blog/treetable#comment-407256 Wed, 24 May 2017 01:08:45 +0000 http://undocumentedmatlab.com/?p=4062#comment-407256 Hi,Yair

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

]]>
Comment on The javacomponent function by Johanneshttp://undocumentedmatlab.com/blog/javacomponent#comment-407218 Tue, 23 May 2017 09:39:56 +0000 http://undocumentedmatlab.com/?p=1793#comment-407218 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);
 
guiel.elementA(1).setFont(newFont2);
guiel.elementA(2).setFont(newFont2);
guiel.elementA(3).setFont(newFont2);
guiel.elementB(1).setFont(newFont2);
guiel.elementB(2).setFont(newFont2);
guiel.elementB(3).setFont(newFont2);

Thank you very much!

]]>
Comment on Customizing uifigures part 2 by Felixhttp://undocumentedmatlab.com/blog/customizing-uifigures-part-2#comment-407215 Tue, 23 May 2017 07:56:13 +0000 http://undocumentedmatlab.com/?p=6635#comment-407215 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 变量出现在每个循环迭代的大小改变-什么? – CodingBloghttp://undocumentedmatlab.com/blog/preallocation-performance#comment-407086 Sun, 21 May 2017 15:00:55 +0000 http://undocumentedmatlab.com/?p=2940#comment-407086 […] Preallocation performance […]

]]>
Comment on Reading non-Latin text files by Yair Altmanhttp://undocumentedmatlab.com/blog/reading-non-latin-text-files#comment-407080 Sun, 21 May 2017 12:36:49 +0000 http://undocumentedmatlab.com/?p=2447#comment-407080 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 Nirhttp://undocumentedmatlab.com/blog/reading-non-latin-text-files#comment-407075 Sun, 21 May 2017 11:59:16 +0000 http://undocumentedmatlab.com/?p=2447#comment-407075 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.

Thanks

]]>
Comment on Explicit multi-threading in Matlab part 1 by JoeVhttp://undocumentedmatlab.com/blog/explicit-multi-threading-in-matlab-part1#comment-406917 Thu, 18 May 2017 18:41:33 +0000 http://undocumentedmatlab.com/?p=4659#comment-406917 It appears the MatlabControl project has been migrated to GitHub (due to Google Code shutting down): https://github.com/jakaplan/matlabcontrol

Documentation at the Wiki: https://github.com/jakaplan/matlabcontrol/wiki

]]>
Comment on Plot LineSmoothing property by Naeem Ullahhttp://undocumentedmatlab.com/blog/plot-linesmoothing-property#comment-406854 Wed, 17 May 2017 20:27:10 +0000 http://undocumentedmatlab.com/?p=1226#comment-406854 Line smoothing is very helpful for me. Thank you

]]>
Comment on Uitable sorting by didihttp://undocumentedmatlab.com/blog/uitable-sorting#comment-406623 Sat, 13 May 2017 16:55:46 +0000 http://undocumentedmatlab.com/?p=2391#comment-406623 Thank! It’s helped me a lot!

]]>
Comment on Undocumented feature() function by Erivelton Geraldo Nepomucenohttp://undocumentedmatlab.com/blog/undocumented-feature-function#comment-406569 Fri, 12 May 2017 17:04:21 +0000 http://undocumentedmatlab.com/?p=1414#comment-406569 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 Mianihttp://undocumentedmatlab.com/blog/customizing-uifigures-part-1#comment-406524 Thu, 11 May 2017 22:40:00 +0000 http://undocumentedmatlab.com/?p=6554#comment-406524 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 Altmanhttp://undocumentedmatlab.com/blog/uitable-sorting#comment-406432 Wed, 10 May 2017 11:18:01 +0000 http://undocumentedmatlab.com/?p=2391#comment-406432 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 Jackhttp://undocumentedmatlab.com/blog/uitable-sorting#comment-406427 Wed, 10 May 2017 10:26:34 +0000 http://undocumentedmatlab.com/?p=2391#comment-406427 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.

Thanks,
Jack

]]>
Comment on Uitable sorting by Yair Altmanhttp://undocumentedmatlab.com/blog/uitable-sorting#comment-406421 Wed, 10 May 2017 08:24:04 +0000 http://undocumentedmatlab.com/?p=2391#comment-406421 @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 Altmanhttp://undocumentedmatlab.com/blog/uitable-sorting#comment-406419 Wed, 10 May 2017 08:19:28 +0000 http://undocumentedmatlab.com/?p=2391#comment-406419 @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 Jackhttp://undocumentedmatlab.com/blog/uitable-sorting#comment-406398 Wed, 10 May 2017 01:04:39 +0000 http://undocumentedmatlab.com/?p=2391#comment-406398 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.

TNX

Jack

]]>
Comment on Speeding up Matlab-JDBC SQL queries by Paulhttp://undocumentedmatlab.com/blog/speeding-up-matlab-jdbc-sql-queries#comment-406321 Mon, 08 May 2017 23:19:17 +0000 http://undocumentedmatlab.com/?p=6742#comment-406321 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
Paul

]]>