Is it possible to extract a comment line from the script itself?
Ältere Kommentare anzeigen
I would like to write the first comment line as a title on my plot.
Akzeptierte Antwort
Weitere Antworten (1)
Joseph Cheng
am 19 Mai 2015
why would you want to do this and not just declare the first comment as a string? if it is truly the first line of the script just
fid = fopen('yourscript.m');
titleline = fgelt(fid);
fclose(fid)
then use title line. if it isn't then just declare the comment as a variable of type string. or copy it.
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!