フィルターのクリア

Why can't I open this saved .fig file in MATLAB live script?

10 ビュー (過去 30 日間)
Debraj
Debraj 2021 年 12 月 10 日
編集済み: Adam Danz 2021 年 12 月 10 日
In the live scipt editor, I have the following command:
open("smoothedprebasemodel.fig")
The live script appears to run, but does not display the saved figure.
I can include
set(gcf,'Visible','on')
and this creates an external figure window along with a badly-rendered in-line Figure.
I've tried loading other figures with just the open command and nothing else, and those seem to work fine. Why?
Version: 9.10.0.1649659 (R2021a) Update 1

回答 (1 件)

Adam Danz
Adam Danz 2021 年 12 月 10 日
編集済み: Adam Danz 2021 年 12 月 10 日
  1. Open the figure in Matlab, set visible = 'on', then save it.
  2. Use openfig(filename) in live editor.
Note that the second input in openfig(filename, visibility) can be used to force the visibility property of the figure upon opening but that won't fix the behavior you're describing since the embedded and the external figures will appear upon setting the visibility property whether it is already 'on' or 'off'. But if the visibile property is already set to 'on', then opening in it live editor should fix the issue.

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by