1
votes

My question is about the evaluation of Monte Carlo simulation results. I have a model in Simulink and I simulate the model with different deviation of parameters.

I have collected the results of 100 simulations, which are normally distributed and I use mean and standard deviation of resulted output when enough repetition is reached. Up to this point, there is no problem.

But since the variables are random, in some cases there are some parameters that are too low or too high, which results in Inf or NaN value as the output. I want to find out a way to represent those infinite results without disturbing or missing any result of the outputs.

Any idea will be appreciated, thanks in advance.

2
Are you sure there's no defect in your simulations?Nzbuu

2 Answers

1
votes

If you're getting Inf or NaN in your simulations, then the chances are that there is a defect in your simulation, or you should be rejecting those results. If you have Inf values, then your mean and standard deviation ought to be Inf also.

You can use the isfinite function to detect non-finite results. These can either be removed, or replaced with new simulation results.

0
votes

There are some solutions on the file exchange that may help.

This submission will not use NaN values in your calculations