Z order (Morton Curve) for matrix .and Hausdorff distance.
9 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Srivardhan Gadila
on 26 May 2020
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 Comments
See Also
Categories
Find more on Graphics Object Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!