Finding start and end point of array from csv

I am trying to set the starting and ending point of x from a csv file when y = 1. How do I do it?
RawDataTable = readtable('blabla.csv');
lengthRawDat = height(RawDataTable);
% Convert raw data
Raw_x = table2array(RawDataTable(:,1));
Raw_y = table2array(RawDataTable(:,2));
Thank you very much!

 채택된 답변

KSSV
KSSV 2022년 2월 10일

0 개 추천

idx = find(Raw_y==1) ;
[idx(1) idx(end)]

댓글 수: 1

is it possible to find the start and end point of an approximate value, like for example 1 +/- 0.1? If so, how?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Tables에 대해 자세히 알아보기

태그

질문:

2022년 2월 10일

댓글:

2022년 2월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by