📄 hlbrtcrv.m
字号:
function [R, S]=hlbrtcrv(M,N)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Y = hlbrtcrv(M,N)% HiLBeRT CuRVe (function)% This function returns the path cooridinates of a% Hilbert Space Filling curve for an MxN matrix. %% INPUT ARGUMENTS:% M -> Number of Rows for the Hilbert path.% N -> Number of Columns for the Hilbert path.%% OUTPUT ARGUMENT:% R -> The row cooridinates of the Hilbert path.% S -> The column cooridinates of the Hilbert path.%% EXAMPLE:% Y = hilbert(32);% imagesc(Y);% axis image;% hold on;% [R,S] = hlbrtcrv(32,32);% plot(R,S,'r');%% Daniel Leo Lau% lau@ece.udel.edu%% June 16, 1998% Copyright 1998 Daniel Leo Lau%% Last modified on June 16, 1998%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Y=hilbert(max([M N]));Y=Y(1:M,1:N);Y=Y(1:M*N)';[s, I]=sort(Y);if (nargout==2) [R,S]=meshgrid(1:N,1:M); R=R(I); S=S(I);else R=I;end;return;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -