assignin function does not work from export function

1 回表示 (過去 30 日間)
Tobias Panitz
Tobias Panitz 2022 年 10 月 12 日
回答済み: Gagan Agarwal 2023 年 9 月 1 日
Hello.
We're using the export function to run an *.mlx file and then export it to a pdf.
I don't seem to be able to interact with the OS filesystem or store data in the base workspace when the *.mlx is executed using the export function
export("Analyse_Template",filename,PageSize="A4",Run=true,FigureResolution=800,HideCode=true);
% using assignin does not work
assignin('base','OutPutTable',OutPutTable)
% using writetable does not work
writetable(inputTable, FName,"WriteMode","append");
Executing the *.mlx file itself produces the desired results.
Why can I not work outside of the scope of the export function?
Many thanks in advance.

回答 (1 件)

Gagan Agarwal
Gagan Agarwal 2023 年 9 月 1 日
Hi Tobias Panitz
I encountered a similar issue when using the live script, but when I ran the code in a .m file instead of “. mlx” file, it executed just fine.

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by