What is the command for making a brand new script, by an already existing script?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Pawel Krenz
am 23 Jan. 2017
Kommentiert: Pawel Krenz
am 24 Jan. 2017
The command mkdir('folder name') creates a folder at current location. I search for the command that creates a script instead. (I wonder too where to read about it)
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 23 Jan. 2017
You need three commands, at least. First call fopen(), then frpintf() as many times as you need, then fclose():
fid = fopen('myScript.m', 'wt');
fprintf(fid, 'clc;\n');
fprintf(fid, 'workspace;\n');
fprintf(fid, 'close all;\n');
% etc. for however many commands you want to put into your m-file.
fclose(fid);
Weitere Antworten (1)
John D'Errico
am 23 Jan. 2017
There is no special command.
Just save a simple file. Use .m as the extension, and it will be interpreted as a script.
1 Kommentar
Walter Roberson
am 23 Jan. 2017
The matter does, though, get more complicated for Live Scripts ('.mlx') files.
Siehe auch
Kategorien
Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!