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!
