'view' - example: "Error using uimenu"

16 ビュー (過去 30 日間)
Moritz Geiger
Moritz Geiger 2017 年 7 月 20 日
回答済み: Arthur Goldsipe 2017 年 9 月 25 日
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!
  2 件のコメント
Rik
Rik 2017 年 7 月 20 日
If you precede these lines with close all,clear cm bg h, does that fix the error?
I can't really think of a reason why this would give an error, except if something strange is going on with previously defined variables or figure windows that have gotten special settings changed.
Moritz Geiger
Moritz Geiger 2017 年 7 月 20 日
Hi Rik! Thank you! Now it works - I'm a total beginner. I was typing the code in mlx an not in m. I guess I should lern the difference. But it works :-)
Thank you!

サインインしてコメントする。

採用された回答

Arthur Goldsipe
Arthur Goldsipe 2017 年 9 月 25 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by