Depth Averaged Velocities - Nanmean higher than excluded values?!
Mostrar comentarios más antiguos
Hello! I am trying to get depth averaged velocities for a time series and have excluded values greater than and less than 1 and -1 in order to get accurate data. I have then taken the nanmean but my velocities are all higher (or lower) than the range I have kept. I'm really not sure what I'm doing wrong here! My code is:
u = ConVel/1000;
a = find(u>=1 & u<=-1);
u(a) = NaN;
u_av = nanmean(u);
But the vector I am left with has values <-4? Thank you for your help!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Guidance, Navigation, and Control 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!