Publish a file along with a file that has function called from another file

49 ビュー (過去 30 日間)
Lucas Vacus
Lucas Vacus 2019 年 8 月 18 日
回答済み: Pravin Jagtap 2019 年 8 月 21 日
I want to publish main file,for example say 'one.m' which includes a function that has been called from another file say 'two.m'.
Now when I publish 'one.m' I want the 'two.m' to be publish in the file.

回答 (1 件)

Pravin Jagtap
Pravin Jagtap 2019 年 8 月 21 日
Hello Lucas,
The task of including the external file contents in one document (using 'publish') can be achieved using ‘publishing markup’. Use following code markup in your ‘one.m’ to include contents of external file ‘two.m’.
%% External File Content Example
% This example includes the file contents of two.m into published
% output.
%
% <include>two.m</include>
%
% The file content above is properly syntax highlighted
Please refer following link and follow section ofExternal file content’ in ‘Results in Output’ column
Kind Regards
~Pravin

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by