Problem 42504. Data Regularization
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.
The first truly vectorized solution I've seen here without using for, while, cellfun, arrayfun, etc.
>> help ismembc2
ismembc2 is an undocumented builtin function.
I'm curious, what DOES this do?
Problem Recent Solvers37
Increment a number, given its digits
Make a random, non-repeating vector.
Get the elements of diagonal and antidiagonal for any m-by-n matrix
Remove entire row and column in the matrix containing the input values
More from this Author29
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!