Browse CSV file and calculate the mean
26 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everyone,
I am on the end on my projet. I need to browse a csv file and to calculate the mean of these values. Then i will put this mean in a new csv file
Does anyone have suggestion or programme for help ?
Thanks
0 Kommentare
Antworten (1)
Ameer Hamza
am 21 Sep. 2020
1) Read the csv file using: readmatrix(): https://www.mathworks.com/help/matlab/ref/readmatrix.html, or readtable(): https://www.mathworks.com/help/matlab/ref/readtable.html.
2) Calculate the mean values of the data according to its dimensions.
3) Write the data to file using writematrix(): https://www.mathworks.com/help/matlab/ref/writematrix.html or writetable(): https://www.mathworks.com/help/matlab/ref/writetable.html
4 Kommentare
Ameer Hamza
am 22 Sep. 2020
Bearbeitet: Ameer Hamza
am 22 Sep. 2020
yes, you can specify the range too. For example,
range = input('Input the range: ', 's'); % input A1:A20
data = readmatrix('filename.csv', 'range', range)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!