Calling multiple live scripts from another script does not embed the output

17 ビュー (過去 30 日間)
I use Live Scripts to produce relatively standard reports, which take a while to process the input data, and generate embedded output using figures and disp() commands.
I would like to have a main.m script to call a bunch of those Live Scripts, to automatically generate the reports overnight, as in
run('LiveScript1.mlx')
run('LiveScript2.mlx')
...
However, in this case, all the output that should be embedded in the Live Scripts, shows as external figures or in the Commmand Window instead.
If this is a feature, what would be the fix?
  3 件のコメント
Joan Vazquez
Joan Vazquez 2020 年 8 月 11 日
As Chidvi Modala mentioned in the accepted answer, this is equivalent to running it from the command line, and the output is not embedded either. I added 3 files to the question, as an MWE. Or am I missing your point?
Walter Roberson
Walter Roberson 2020 年 8 月 11 日
Using the run() function is not equivalent to running from the command line or being called from a function. The response was only clear for using the run() function.
However perhaps there is just one missing word,
"Live Scripts should run the same AS regular .m script if called from the command line, or by another file."

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

採用された回答

Chidvi Modala
Chidvi Modala 2020 年 8 月 11 日
編集済み: Chidvi Modala 2020 年 8 月 11 日
When "run" GUI in the MATLAB Editor is used to run a live script, it embeds the output to the live script. When "run" function is used to run live scripts, the output is not embedded to the live script. This is expected behavior. Live Scripts should run the same regular .m script if called from the command line, or by another file.
At this point, the only way to update the outputs in the file is to run the script interactively in the Live Editor.
I have brought this issue to the notice of our developers. They will try to work on it in future releases.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLive Scripts and Functions についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by