How to find min and max of a text file full of numbers?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
NikePro
el 5 de Feb. de 2016
Comentada: Star
el 6 de En. de 2019
I am trying to figure out how to find a specific value in a text file such as being able to find a min and max by MATLAB reading a .txt and finding the max / min values.
2 comentarios
Respuesta aceptada
Star Strider
el 5 de Feb. de 2016
This works:
fidi = fopen('Kurtis2821 Text.txt','r');
D = textscan(fidi, '%f%f%f%f%f', 'HeaderLines',1, 'CollectOutput',1);
FileMax = max(D{:}(:))
FileMin = min(D{:}(:))
FileMax =
146.7
FileMin =
-121.08
1 comentario
Más respuestas (0)
Ver también
Categorías
Más información sobre Environment and Settings 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!