| 
			
		 	
		 From: Kirk on 4 May 2010 12:45 I am running multiple iterations of a simulation process and then outputting means from all iterations with a simple call like this: % Calculate means from Monte Carlo runs tmax_mean=mean(tmax,2); Every so often... one time in a thousand or so, the random combination of parameters results in NaN output. Which of course, results in NaN means. I am looking for a MATLABish approach to calculate the mean of the variable tmax, but skip the NaNs. Thanks in advance 	
		 From: Sean  on 4 May 2010 13:02 		"Kirk" <kwythers.nospam(a)umn.edu> wrote in message <hrpiuv$1nq$1(a)fred.mathworks.com>... > I am running multiple iterations of a simulation process and then outputting means from all iterations with a simple call like this: > > % Calculate means from Monte Carlo runs > tmax_mean=mean(tmax,2); > > Every so often... one time in a thousand or so, the random combination of parameters results in NaN output. Which of course, results in NaN means. > > I am looking for a MATLABish approach to calculate the mean of the variable tmax, but skip the NaNs. > > Thanks in advance >>help nanmean 	
		 From: us  on 4 May 2010 13:45 		"Kirk" <kwythers.nospam(a)umn.edu> wrote in message <hrpiuv$1nq$1(a)fred.mathworks.com>... > I am running multiple iterations of a simulation process and then outputting means from all iterations with a simple call like this: > > % Calculate means from Monte Carlo runs > tmax_mean=mean(tmax,2); > > Every so often... one time in a thousand or so, the random combination of parameters results in NaN output. Which of course, results in NaN means. > > I am looking for a MATLABish approach to calculate the mean of the variable tmax, but skip the NaNs. > > Thanks in advance a hint: - if(f) you own the stats tbx help nanmean; % <- and siblings... us 	
		 From: Kirk on 4 May 2010 13:51 		> >>help nanmean Wow. That's nice! 
		  | 
 
		Pages: 1 Prev: APPCOEF IN WAVELET TOOL BOX Next: Quant Developer Needed; Top Hedge Fund; London  |