Split vector in groups of data and plot best fit
이전 댓글 표시
Good evening,
I have a group of data in the following format:
Dat = [ NaN ; NaN ; 23 ; 34 ; 5 ; 12 ; 4 ; 123 ; NaN ; NaN ; Nan ; 23 ; 4 ; 1 ; 4 ; 21 ; Nan ; 234 ; 12 ; 3 ; 12 ; NaN ; 342 ; 32 ; NaN ; NaN ; NaN ; NaN ; 34 ] ;
I would like to take the groups of values between the NaN sets and plot best fit equation. So I would take:
a = [23 34 5 12 4 123 ] b= [23 4 1 4 21] c= etc....
and plot a best fit curve for each of these.
I have managed to come up with a way using indices and a for loop, but it is way to complicated. Also this results to some bugs coming up as we saw with my teacher. So is there any way you would suggest?
KR,
Kosta
댓글 수: 1
Konstantinos Tsitsilonis
2017년 6월 23일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 NaNs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!