Clear Filters
Clear Filters

Why is a regular expression used in this code?

1 view (last 30 days)
I found a code to dump zero rows/columns in the southeast part of a given matrix:
function b = ZeroDumping(a)
regexp '' '(?@ b=transpose(deblank(transpose(deblank(a)))); )'
end
I do understand the part 'b=transpose(deblank(transpose(deblank(a))));', but I have no idea what the other parts are doing. Why is the regular expression used in this code? What does " '' '(?@" represent?

Accepted Answer

Rik
Rik on 4 Jan 2022
This syntax is designed to fool the Cody score calculator to think it is using only a few non-complex function calls.
In every other situation this is a terrible way to write code.
  2 Comments
Daigo
Daigo on 4 Jan 2022
Oops, such an evil purpose behind this code! I won't copy this code, then.

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!