Dear Mottelet Thank you for your useful advice. 1, By changing repmat(timePoints_V,2*sample,1) to timePoints_M=ones(2*sample,1)*timePoints_V and using it, calculation time is improved by 25 seconds.
2, "cumsum" is not a bottleneck because it takes only 2 seconds to finish. Also, if I change cumsum(wY1_M,'c') to linear algebra version wY1_M*triu(ones(time_step,time_step)), calculation time increases to 2 minutes although CPU usage rate rose greatly. "cumsum" function seems efficient function. 3, Is there any way to improve random number matrices generation? The attached file is a snapshot of the task manager when generating random matrices. It shows the CPU utilization remains low despite using many slots. What is the cause? snapshot_of_task_manager2.png <http://mailinglists.scilab.org/file/t497065/snapshot_of_task_manager2.png> 4, If I can generate multiple random matrices with smaller row size at the same time and integrate them at the end, I expect the processing time will be shorter, but can not I do such a thing? Best regards. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users