- Define the range of values to read in xlsread and csvread (see the respective function documentation),
- Define 'HeaderLines',6 in textscan,
- Read in everything and then delete the first 6 rows, regardless of the function you use to import them.
Hot to take the first data values out and then plot all of data
조회 수: 2 (최근 30일)
이전 댓글 표시
So each sample I take has 406 csv's. And I would like to leave the first six values out of the sample and then plot, just without those first 6 values. New to matlab. Any ideas?
Thanks
댓글 수: 0
답변 (2개)
Star Strider
2016년 7월 11일
There are at least three ways to deal with that, depending on the function you’re using to read your .csv files.
댓글 수: 6
Star Strider
2016년 7월 12일
Thank you.
The entire format descriptor is:
['%*f%*f%*f%*f%*f%*f' repmat('%f', 1, 400)]
In MATLAB, the square brackets when applied to strings act as a concatenation operator, here forming one string of all the elements within the brackets. The first six fields are ‘%*f’, with the asterisk telling MATLAB to ignore each of those fields. The repmat call avoids my having to type ‘%f’ 400 times to read in the 400 following values. (I could have use a repmat call for the first six fields as well, but considered that to be sort of ‘overkill’.)
Walter Roberson
2016년 7월 12일
YourData([1:406:end, 2:406:end, 3:406:end, 4:406:end, 5:406:end, 6:406:end], :) = [];
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!