Z order (Morton Curve) for matrix .and Hausdorff distance.
조회 수: 8 (최근 30일)
이전 댓글 표시
Hi everyone, I'm new and I'm doing a photo-processing project to recognize faces.
I have problem calculating the Z order for the matrix. I saw a code about it
function A = mapping(n)
% To create a Morton Scan order matrix
if n == 2
A = [1 2; 3 4];
else
B = mapping(n/2);
A = [B B+(n/2)^2; B+(n/2)^2*2 B+(n/2)^2*3];
end
But when I did it reported an error
>> Zorder(C)
Undefined function or variable 'mapping'.
Error in Zoder (line 6)
B = mapping(n/2);
Im working on Local Start Search algorithm
댓글 수: 0
답변 (1개)
Srivardhan Gadila
2020년 5월 26일
From the above information the function mapping calls itself recursively.
So if you simply renamed the function mapping to Zorder without adding more code or without making any other changes then you also have to change the line
B = mapping(n/2);
to
B = Zorder(n/2);
If you have done anything differently than mentioned above in the answer, then can you provide more details & reproduction steps?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!