Split vector in groups of data and plot best fit
Mostrar comentarios más antiguos
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 comentario
Konstantinos Tsitsilonis
el 23 de Jun. de 2017
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Interpolation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!