without loop makes it quite difficult..is there any particular built-in function to do this?
You do know that Matlab most certainly uses while and for loops to multiply matrices internally. The vectorized solution is probably faster because of parallelization and other optimization tricks, which we could also implement with the proper toolboxes.
And please add an space to strfind, or else It will find fors and whiles inside comments and even parameter names. I was using a parameter "Uniform" of the function cellfun and it took me a while to realize why it was failing the first test.
Remove any row in which a NaN appears
6833 Solvers
How to find the position of an element in a vector without using the find function
2478 Solvers
503 Solvers
How many trades represent all the profit?
520 Solvers
207 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!