Errors when using MATLAB R2014b

1,602 views
Skip to first unread message

r.f...@sheffield.ac.uk

unread,
Oct 29, 2014, 8:56:30 AM10/29/14
to microbe...@googlegroups.com
Hi all

I haven't used MicrobeTracker for a couple of years. I've just installed MATLAB R2014b and downloaded the latest release of MicrobeTracker 0.937. I'm using a mac so I've also installed xcode.

When I launch MicrobeTracker I get this error: 

Attempt to reference field of non-structure array.

Error in microbeTracker/resizefcn (line 1064)
    pos = get(handles.maingui,'position');

 
Error using figure
Error while evaluating Figure SizeChangedFcn

but the correct window does open. However if I then try to load any image (including the examples) using "Load phase' I get:

Error using matlab.ui.container.Panel/horzcat
While converting from 'cell':
 The conversion returned a value of class 'matlab.mixin.Heterogeneous', which cannot be inserted into an array of class
 'matlab.ui.container.Panel'.

Error in microbeTracker/displayImage (line 1290)
        dellist = [dellist get(handles.hfig,'Children')];


Error in microbeTracker/loadstackdisp (line 2989)
    displayImage


Error in microbeTracker/loadstack (line 3029)
            res = loadstackdisp(1,filename);

 
Error while evaluating UIControl Callback

and no image loads.

I'm completely stuck. I've used microbetracker with no problems on another mac in the past - using MATLAB R2012b. Could it be an issue with the new MATLAB? Am I missing a library? Any suggests would be greatly appreciated!

Rob Fagan

r.f...@sheffield.ac.uk

unread,
Oct 31, 2014, 7:34:41 AM10/31/14
to microbe...@googlegroups.com
Solved!

It's down to the graphics changes implemented in 2014b. That version is the only one compatible with OSX Yosemite unfortunately. However there are patches available which allow earlier MatLab builds to run on Yosemite - https://www.mathworks.com/support/bugreports/1098655

I've now got 2012b running perfectly and MicrobeTracker now works perfectly.

R

Anne Egholm Pedersen b

unread,
Nov 7, 2014, 10:57:06 AM11/7/14
to microbe...@googlegroups.com


As stated by Rob, due to graphics changes in Matlab 2014b release the Matlab built-in 'ResizeFcn' handler gets called before any variables are declared, hence the error.  To resolve this issue in the microbetracker.m file in the line handles.maingui = figure('..............................) call set the 'Visible' proper to off. And at the end of the gui calls to components under line
rmask{4} = strel('arbitrary',[0 0 0 0 1; 0 0 0 1 0; 0 0 0 0 0; 0 1 0 0 0; 1 0 0 0 0]); insert the line

set(handles.maingui,'visible','on');

save the microbetracker.m file and re-launch the gui.  This change is applicable to all version of Matlab, i.e; it will work in earlier versions of Matlab as well.


Regards,

Jacobs-Wagner Lab

jeffca...@gmail.com

unread,
Nov 12, 2014, 12:51:46 AM11/12/14
to microbe...@googlegroups.com
Hi All,

I was having the same problem opening MicrobeTracker 0.937 on Mac running Yosemite. 

I originally got this error when launching, but was able to solve it using the modifications as suggested above:

Attempt to reference field of non-structure array.

Error in microbeTracker/resizefcn (line 1064)
    pos = get(handles.maingui,'position');

 
Error using figure
Error while evaluating Figure SizeChangedFcn

However, When I try to open a phase image, I still get an error and am not able to visualize any data. I still get the following error:

>> microbeTracker

Loaded 1 images from a multipage TIFF

Error using matlab.ui.container.Panel/horzcat

While converting from 'cell':

 The conversion returned a value of class 'matlab.mixin.Heterogeneous', which cannot

 be inserted into an array of class 'matlab.ui.container.Panel'.


Error in microbeTracker/displayImage (line 1291)

        dellist = [dellist get(handles.hfig,'Children')];



Error in microbeTracker/loadstackdisp (line 2990)

    displayImage



Error in microbeTracker/loadstack (line 3030)

            res = loadstackdisp(1,filename);


 

Error while evaluating UIControl Callback


Any suggestions would be appreciated.


Thanks,

Jeff


bianca...@college.harvard.edu

unread,
Nov 24, 2014, 7:24:31 PM11/24/14
to microbe...@googlegroups.com, jeffca...@gmail.com
I also made the changes suggested above and am getting the same error:

Error using matlab.ui.container.Panel/horzcat
While converting from 'cell':
 The conversion returned a value of class 'matlab.mixin.Heterogeneous', which cannot be
 inserted into an array of class 'matlab.ui.container.Panel'.

Error in microbeTracker/displayImage (line 1291)
        dellist = [dellist get(handles.hfig,'Children')];

Error in microbeTracker/loadstackdisp (line 2990)
    displayImage

Error in microbeTracker/loadstack (line 3030)
            res = loadstackdisp(1,filename);
 
Error while evaluating UIControl Callback

Any help would be appreciated!

Thanks,
Bianca

Ciaran Kelly

unread,
Dec 5, 2014, 8:40:15 AM12/5/14
to microbe...@googlegroups.com, jeffca...@gmail.com, bianca...@college.harvard.edu
Same here:

>> microbeTracker
Attempt to reference field of non-structure array.

Error in microbeTracker/resizefcn (line 1065)
    pos = get(handles.maingui,'position');
 
Error using figure
Error while evaluating Figure SizeChangedFcn


handles = 

    maingui: [1x1 Figure]


ans =

Visible

Loaded 788 images from a multipage TIFF
Error using matlab.ui.container.Panel/horzcat
While converting from 'cell':
 The conversion returned a value of class 'matlab.mixin.Heterogeneous', which cannot be inserted into an array of class
 'matlab.ui.container.Panel'.

Error in microbeTracker/displayImage (line 1291)
        dellist = [dellist get(handles.hfig,'Children')];

Error in microbeTracker/loadstackdisp (line 2990)
    displayImage

Error in microbeTracker/loadstack (line 3050)
            res = loadstackdisp(3,filename);
 
Error while evaluating UIControl Callback

bauer...@gmail.com

unread,
Feb 6, 2015, 6:41:54 AM2/6/15
to microbe...@googlegroups.com, jeffca...@gmail.com, bianca...@college.harvard.edu
Hi,

I'm not using MicrobeTracker at all, but have a same problem in general whenever trying to save a MATLAB figure as .fig in R2014b.
Always get an error dialog saying:

Error using matlab.ui.Figure/horzcat
While converting from 'char':
The conversion returned a value of class 'matlab.mixin.Heterogeneous', which cannot be inserted into an array of class 'matlab.ui.Figure'.

The command window shows:

Warning: Regular expression comparison is not supported for the 'FontName' property: using ordinary comparison.
> In savefig at 45
  In general\private\saveasfig at 6
  In saveas at 140
  In filemenufcn>localSaveExportHelper at 211
  In filemenufcn>localSaveExport at 339
  In filemenufcn at 56


No idea where this comes from, but I don't have the microbetracker.m file so there must be an internal problem. Any suggestions??

THX

David Magnan

unread,
May 12, 2015, 11:47:36 AM5/12/15
to microbe...@googlegroups.com, jeffca...@gmail.com
I also have this problem after installing 2014b on Windows.  This seems like it may not be as straightforward of a fix however, if Matlab is handling the container differently.  Is it going to be possible to fix this, by telling us what changes need to be made or with a new release? 

jakw...@gmail.com

unread,
May 26, 2015, 5:30:53 PM5/26/15
to microbe...@googlegroups.com
Hello everybody,

If you are still puzzled how to run microbeTracker on Matlab 2014b or later here is my additional fix (besides to changing 'visible' state of the figure.maingui):

replace lines 1290 and 1291 with those 2 lines.

dellist{end+1} = get(handles.hfig,'Children');
dellist{end+1} = get(handles.impanel,'Children');

then the 'load stack' error will be gone. As far as I understand matlab in later editions those handles are not willing to concatenate like with the square brackets.

It worked on my computer, analysis was running fine, I could save the mesh, load signals and so on.
If it crashes for anybody please report it here, I will check this topic once or twice and maybe I will understand it better, if it crashes.

All the best in your research!
Jakub

mgla...@wisc.edu

unread,
Jun 26, 2015, 3:06:37 PM6/26/15
to microbe...@googlegroups.com

handles.maingui = figure('pos',[100 100 1000 800],'WindowButtonMotionFcn',@mousemove,'windowButtonUpFcn',@dragbutonup,'windowButtonDownFcn',@selectclick,'KeyPressFcn',@mainkeypress,'WindowKeyPressFcn',@wndmainkeypress,'WindowKeyReleaseFcn',@wndmainkeyrelease,'CloseRequestFcn',@mainguiclosereq,'Toolbar','none','Menubar','none','Name','MicrobeTracker 0.937','NumberTitle','off','IntegerHandle','off','ResizeFcn',@resizefcn);


Thanks so much for your help. I made the other corrections, but haven't been able to identify the "Visible" proper in the line above. What should I turn to "off"?

luca....@gmail.com

unread,
Jul 9, 2015, 11:09:26 AM7/9/15
to microbe...@googlegroups.com, jakw...@gmail.com
Many thanks Jakub, 
It works for me. Matlab R2015a on Windows 7. 
Bests, 

muge...@gmail.com

unread,
Aug 25, 2015, 6:49:24 AM8/25/15
to MicrobeTracker_Jacobs-Wagner Lab
Thanks for your help. But as a matlab noob I do not know how to set Visible' proper to off. Could you explain it in more detail? Would be very helpful. Thanks

hazelwa...@gmail.com

unread,
Mar 3, 2016, 1:20:53 PM3/3/16
to MicrobeTracker_Jacobs-Wagner Lab
Hey, 

Replacing line 1290 and 1291 worked for me as well! Just loaded the images! 

Using El Capitan R2015b 
Reply all
Reply to author
Forward
0 new messages