Why is a regular expression used in this code?

조회 수: 1 (최근 30일)
Daigo
Daigo 2022년 1월 4일
댓글: Star Strider 2022년 1월 4일
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?

채택된 답변

Rik
Rik 2022년 1월 4일
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
Daigo
Daigo 2022년 1월 4일
Oops, such an evil purpose behind this code! I won't copy this code, then.
Star Strider
Star Strider 2022년 1월 4일
I never would have guessed that!
+1

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by