Text File Read Matlab
古いコメントを表示
Hello Folks!
I have 165 text files consist of the single column. I want to save 165 columns in matlab format so that I can take the means of the average score. Kindly guide me in this regard. Thaking in anticipation.
Truly,
Adeel
5 件のコメント
dpb
2021 年 4 月 6 日
No need to necessarily create new file or hold all in memmory.
Just read each in turn and either accumulate sum and number if it is global mean wanted or compute the mean of each file and save in turn.
It's unclear what is the actual result wanted -- 165 means or just one?
Walter Roberson
2021 年 4 月 6 日
What should be done if the text files do not all have the same number of columns ?
Khan Muhammad Adeel Khan
2021 年 4 月 7 日
Khan Muhammad Adeel Khan
2021 年 4 月 7 日
回答 (1 件)
Sulaymon Eshkabilov
2021 年 4 月 7 日
0 投票
Step 1. Data import from your txt file, e.g.: uiimport()
Step 2. Save imported data
Step 3. Compute the mean of the imported data using mean()
Step 4. Analyze and Report the results.
Good luck.
カテゴリ
ヘルプ センター および File Exchange で Text Data Preparation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!