Browse CSV file and calculate the mean
21 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Ameer Hamza
el 21 de Sept. de 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 comentarios
Ameer Hamza
el 22 de Sept. de 2020
Editada: Ameer Hamza
el 22 de Sept. de 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)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!