To perform a sensitivity analysis I am running *.sbproj coded models using 'biosimulate' in a for-loop and see for some parameter combinations the following warning:
Warning: The right-hand side of the system of SimBiology ODEs results in complex numbers. The imaginary part of the result will be ignored.
> In sbioodeflux_298d036b_ba03_4469_9210_25b32c7bbb2b (line 44)
In sbiosimulate (line 140)
In GSA (line 107)
Can I trust the solutions? If not, how can I exclude the solutiuons which resulted in the warning above, i.e. is there a way to find programatically if a warning was produced?
I added assignment of NaN's in case of fatal errors but still don't know how to handle the warnings.
[t,y] = sbiosimulate(m1);
f1(i,j) = trapz(t,y(:,varNo));
f2(i,j) = y(end,varNo);
disp( getReport( me, 'extended', 'hyperlinks', 'on' ) )
f1(i,j) = NaN;
f2(i,j) = NaN;
disp('Found an error-----------------------')