Monday 15 June 2015

matlab - speed up replace NaNs with last non-Nan value -


I would like to change all Naano vector with last week's non-Anaan value

  Input = [1 2 3 NaN NaN 2]; Output = [1 2 3 3 3 2];   

I will try and speed up the loop I already have

  input = [1 2 3 NaN NaN 2]; If Adnan (Input (1)) Input (1) = 0; I = 2 for inputting (input) if uran (input (i)) input (i) = input (i-1);   

Thanks in advance

Since you want the past Non-nan values, I think the first value should be a number

  while (any (input) input (adapter) = input (find (isnan (input)) - 1); finally   

I solve a Dylan solve Oleg, and 47.7 million have my message length vector. There were 123 seats for the tiles, Oleg 3.7, and 1.9 for me. < / Html>

No comments:

Post a Comment