Imported matrix size loop

Hi all, I'm trying to find a way to make matlab measure the amount of rows of .csv that I import. The purpose being to later associate an interval directly correlated with the amount of data imported(by row).
In short for example:
if x amount of rows are imported, then x interval
in y amount of rows imported, then y interval
etc.
I've included my .m file and a sample data file.
Thank you!
P.S. I am using 2014a

4 件のコメント

Stephen23
Stephen23 2018 年 2 月 20 日
@Dylan Mecca: what is your question?
Dylan Mecca
Dylan Mecca 2018 年 2 月 20 日
I'm looking for a way to count the amount of rows in whatever imported data
Bob Thompson
Bob Thompson 2018 年 2 月 20 日
If you've imported the data into an array, could you not just use size()? Perhaps I'm just making things too simple.
Dylan Mecca
Dylan Mecca 2018 年 2 月 20 日
This ended up being exactly what I needed. Thank you!

回答 (1 件)

Gil Kolin
Gil Kolin 2018 年 2 月 21 日

0 投票

I deleted my answer, so again (for the future): if you need to use just one line you can split it: aaa=strsplit(file_split,'\n'); size(aaa)

1 件のコメント

Dylan Mecca
Dylan Mecca 2018 年 2 月 21 日
Thank you

この質問は閉じられています。

製品

質問済み:

2018 年 2 月 20 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by