creating folder in matlab

21 vues (au cours des 30 derniers jours)
PA
PA le 14 Juil 2022
Commenté : KSSV le 15 Juil 2022
how can i create a folder in matlab which will store all my text files in it

Réponses (2)

KSSV
KSSV le 14 Juil 2022
Read about mkdir

Chunru
Chunru le 14 Juil 2022
% 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 commentaires
Chunru
Chunru le 15 Juil 2022
Show your code.
KSSV
KSSV le 15 Juil 2022
It saves in the pwd... You give path in the name.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by