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!