MATLAB: ‘view’ – example: “Error using uimenu”

biographBioinformatics Toolboxerrorexamplelive scriptview

Hello! I just startet working with Matlab. I took one example from the website, but an error occurred:
cm = [0 1 1 0 0;1 0 0 1 1;1 0 0 0 0;0 0 0 0 1;1 0 1 0 0]
bg = biograph(cm)
h = view(bg)
I get this error:
Error using uimenu
First argument must be a valid parent, such as a Figure or Panel object.
Error in biograph.bggui>makeBiographViewerUIMenus (line 298)
uimenu(hw,'Label','Export to Workspace...','Position',1,'Callback',{@exportToWorkspace,bh})
Error in biograph.bggui (line 38)
makeBiographViewerUIMenus(fh,bh);
Error in biograph.biograph/view (line 49)
g = biograph.bggui(h);
What am I doing wrong, using the example?
Thank you!

Best Answer

I believe biograph needs to be updated to work properly in Live Scripts (MLX files). One workaround is to use a regular script (M file) instead.