Drawing two times without replacement from a csv file

2 ビュー (過去 30 日間)
Chloë Müh
Chloë Müh 2022 年 2 月 4 日
回答済み: Rishabh Singh 2022 年 2 月 7 日
Greetings everyone,
I am very new to Matlab and I am trying to elaborate a specific line of code that orders Matlab to load a csv file - previously created and filled with randomized data that I've used in the first part of my experiment - and use the other half of the randomized data for the second part of that same experiment. Is there a simple function that I can use in order to accomplish that specific purpose ?
Thank you for your help !
  1 件のコメント
Davide Masiello
Davide Masiello 2022 年 2 月 4 日
Hi, it'd be helpful to see the .csv file and to have a better idea of the kind of result you want to obtain.
I don't think there is a specific function capable of doing that, but you can possibly get away with a small script.

サインインしてコメントする。

回答 (1 件)

Rishabh Singh
Rishabh Singh 2022 年 2 月 7 日
Hi,
As per my understanding you wish to load your already created CSV file into the MATLAB workspace and use the half portion of the data for your second experiment.
For loading of CSV file, the readtable function will store the CSV file into "table" container
table = readtable("myCSVFile.csv");
refer to "readtable" for more information.
also for accessing perticular fields in the "table" refer to "Access Data in Tables".
More information regarding the data stored in CSV file can help me answer your question much better.
Hope this helps.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by