i have 4 .csvfiles imported into my code like this
Choice1= readtable ('computerchoice1.csv');
Choice2= readtable ('computerchoice2.csv');
Choice3= readtable ('computerchoice3.csv');
Choice4= readtable ('computerchoice4.csv');
how do i wirte code for it to randomly select one of them and to use with the rest of the code

 Akzeptierte Antwort

KSSV
KSSV am 1 Jan. 2022

0 Stimmen

csvFiles = dir('*.csv');
N = length(csvFiles) ;
idx = randi(N,1) ;
csvFile = csvFiles(idx).name ;
T = readtable (csvFile);

Weitere Antworten (0)

Kategorien

Mehr zu Verification, Validation, and Test finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 1 Jan. 2022

Beantwortet:

am 1 Jan. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by