How to include external code when publishing?

18 Ansichten (letzte 30 Tage)
Pawel
Pawel am 4 Feb. 2016
Beantwortet: Paul Wintz am 11 Feb. 2022
I'm trying tu “publish” a script including the code of the called functions/scripts in pdf. I found “publishdepfun” which produces nice html files but not really working with pdf.
As I know it should be possible to include those files in this way:
%
% <include>file1.m</include>
%
But this is not working for some reason. In the pdf file this results then in:
include>file1.m</include
What can I do?

Antworten (1)

Paul Wintz
Paul Wintz am 11 Feb. 2022
You must have no more than one space between "%" and "<include>". Having spaces before the "%" might also cause problems, so change " % <include>file1.m</include>" to "% <include>file1.m</include>".

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by