read only range of values from csv

조회 수: 3 (최근 30일)
SINDU GOKULAPATI
SINDU GOKULAPATI 2021년 6월 9일
답변: KSSV 2021년 6월 9일
i have a csv file with data in a coloumn ranging from 1.000 to 6.000
is there a way i can read only the values ranging between 4.567 to 4.577 ?
your help is very much appreciated thanks

답변 (1개)

KSSV
KSSV 2021년 6월 9일
You can read the entire data and then pick your required using indexing.
data = csvread(myfile) ; % assuming file has single column
idx = data >= 4.567 & data <= 4.577 ;
iwant = data(idx) ;

카테고리

Help CenterFile Exchange에서 Low-Level File I/O에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by