Select data from excel sheet from specific row to specific row
이전 댓글 표시
Hi,
I have excel sheet with 8 columns and a lot of rows that are divided into cycles.

I need to make a chart that contains values of all rows that are between values 1...100Cykle. It should looks like below:

Is it possible to load to matlab values from specific row to another row to make chart from them?
댓글 수: 2
Dyuman Joshi
2023년 8월 1일
"Is it possible to load to matlab values from specific row to another row to make chart from them?"
Yes.
Though I don't understand what exactly the Cykle in your data is.
Can you attach your data (the excel file)? Use the paperclip button to do so.
Bartosz Pasek
2023년 8월 1일
채택된 답변
추가 답변 (1개)
dpb
2023년 8월 1일
It's possible to specify rows to load by address,but NOT by cell content.
You read the full file and then select the data desired by processing the content. In your case you'll have the first task to extract the numeric value of the first column and then find which row contains the range of interest...you may find something like
t=readtable('yourfile');
n=str2num(extract(t.Column1,digitsPattern));
a useful start; you can then locate which are within the desired bounds with a numeric comparison instead of text and locate those values in the file from which to select (it appears) the rows 1 after:1 before the succeeding value as containing the data of interest.
Attaching an actual (smallish) file would let folks illustrate more easily...
댓글 수: 4
Bartosz Pasek
2023년 8월 1일
tT=readtable('prow_KL_1.xlsx');
head(tT)
No sign of the cycle indicator in that file????
tT(740:750,:)
Well that has some NaN at the locations shown in the original; is that some sort of klew, mayhaps? What's just ahead of this???
tT(735:745,:)
Well, there's a section between some numeric values, but it's too much to expect us to ferret out what it is that's here and how if relates to the original question/fiile...
Bartosz Pasek
2023년 8월 1일
Voss
2023년 8월 1일
The NaN rows reported by readtable are actually rows with chars, which can be seen by using readcell.
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
