creating folder in matlab

조회 수: 7 (최근 30일)
PA
PA 2022년 7월 14일
댓글: KSSV 2022년 7월 15일
how can i create a folder in matlab which will store all my text files in it

답변 (2개)

KSSV
KSSV 2022년 7월 14일
Read about mkdir

Chunru
Chunru 2022년 7월 14일
% create folder (in current folder)
folder = "mydir";
mkdir(folder);
% save data in a file in the folder
a = rand(3);
save(fullfile(folder, 'test.txt'), 'a', '-ascii');
% show the file
type mydir/test.txt
9.1502065e-01 3.7285299e-01 4.3150896e-01 7.5313780e-01 3.3675547e-01 7.8404462e-01 6.1655730e-01 8.5559888e-01 5.9375337e-01
  댓글 수: 3
Chunru
Chunru 2022년 7월 15일
Show your code.
KSSV
KSSV 2022년 7월 15일
It saves in the pwd... You give path in the name.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by