フィルターのクリア

how this save will work, mkdir(database ) y = strcat(dat​abase,'/tr​ainID'); save(y,'trainID')

2 ビュー (過去 30 日間)
Kanwal Kaur
Kanwal Kaur 2016 年 11 月 18 日
回答済み: KSSV 2016 年 11 月 18 日
mkdir(database) % will make new folder
x= strcat(database,'/Subtrain'); %horizontally concatenatesstrings in arrays
save(x,'Subtrain') % saves variable
y = strcat(database,'/trainID');
save(y,'trainID')
am i right or not ?? and what is "/trainID" here,and how this save will work ?

採用された回答

KSSV
KSSV 2016 年 11 月 18 日
Your code opens a folder given in database and in that folder saves two .mat files with name Subtrain.mat and trainID.mat. In these files, the data is provided by variables Subtrain and trainID respectively.
clc; clear all ;
database = 'Folder' ;
Subtrain = rand(100,1) ;
trainID = 'This can be number or string' ;
mkdir(database) % will make new folder
x= strcat(database,'/Subtrain'); %horizontally concatenatesstrings in arrays
save(x,'Subtrain') % saves variable
y = strcat(database,'/trainID');
save(y,'trainID')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by