I need to generate random deviates x according to a given cumulative distribution y that is available only in tabular form.
Scilab coding was easy by table lookup: length(y)= 360. // only for general information N=1000; z=grand(1,N,'def'); x=[]; for i=1:N; x=[x find(y>z(i),1)]; end; Problem is that execution times are exponentially increasing when I want one million deviates. Can you suggest a significantly more efficient procedure? Heinz _______________________________________________ users mailing list [email protected] http://lists.scilab.org/mailman/listinfo/users
