Please do not check for the occurance of "for" in general, because "UniFORmOutput" has nothing to do with looping ;-)
Your predefined function signature has only one parameter, altough two were submitted. Same problem without the "for" restriction: http://www.mathworks.com/matlabcentral/cody/problems/555-low-high-low-high-turn-around-create-a-subindices-vector
This is an excellent problem.
I agree with Dirk. Change your regexp to check for instances of eval, for, and while that are not preceded or followed by additional letters.
give me a hint, should we use a specific function here?
Tip: replace UniformOutput with uni.
'uniformoutpot' is innocent orz~~
'uniformoutput' is innocent orz~~
A separate test case that tests for functions that are against the rules would improve this problem. In this case, the "for" in "UniformOutput" was getting caught by the search. A separate test case would have made clear that the solution functions properly but contains an outlawed string.
Wonderful !
Why x3=[] in the test ?
Nice recursion !
Each solution of Richard is a gem.
Remove any row in which a NaN appears
6837 Solvers
Basics: 'Find the eigenvalues of given matrix
324 Solvers
315 Solvers
498 Solvers
Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
762 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!