What is the command for making a brand new script, by an already existing script?
조회 수: 5 (최근 30일)
이전 댓글 표시
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
채택된 답변
Image Analyst
2017년 1월 23일
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);
추가 답변 (1개)
John D'Errico
2017년 1월 23일
There is no special command.
Just save a simple file. Use .m as the extension, and it will be interpreted as a script.
댓글 수: 1
Walter Roberson
2017년 1월 23일
The matter does, though, get more complicated for Live Scripts ('.mlx') files.
참고 항목
카테고리
Help Center 및 File Exchange에서 Animation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!