Time Series data: Extract values above a certain value into a new vector
Show older comments
I am using time series wind data and would like to make a new matrix containing only wind speeds above a given value.
Example:
wndsa_095 = original data
tWind_095 = filtered data
if wndsa_095 > 2.0000
tWind_095 == wndsa_095
else
tWind_095 == NaN
end
Still trying to wrap my head around logic and loops...
Thanks,
Clay
Answers (1)
Follow below if you want to replace nans for values less then 2.
tWind_095 = wndsa_095;
twind_095(wndsa_095<2)=NaN ;
Follow below if you want to extract values greater then 2.
twind_095= wndsa_095(wndsa_095>2) ;
Categories
Find more on NaNs in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!