?? gen_scale.m
字號:
function [X_out, A, B] = Gen_Scale(X,lb,ub)%% Clustering Through Ranking On Manifolds% Version 0.2%% Copyright by Markus Breitenbach and Gregory Z. Grudic% This code is for your personal and research use only.%% http://www.cs.colorado.edu/~grudic/% http://ucsu.colorado.edu/~breitenm/%% This software is provided "as is," without warranty of any kind, express% or implied. In no event shall the authors be held liable% for any direct, indirect, incidental, special or consequential damages% arising out of the use of or inability to use this software.%%lb = 0;, ub = 1;X_out = zeros(size(X));n = size(X,2); % input dimension sca = zeros(n,1);mina = zeros(n,1);maxa = zeros(n,1);A = zeros(n,1);B = zeros(n,1);for i=1:n mina(i) = min(X(:,i)); maxa(i) = max(X(:,i)); sca(i) = maxa(i) - mina(i);endfor i=1:n if abs(sca(i)) > eps A(i) = (ub - lb)/sca(i); B(i) = lb - A(i)*mina(i); X_out(:,i) = A(i)*X(:,i) + B(i); else A(i) = 1.0; B(i) = -mean(X(:,i)); X_out(:,i) = A(i)*X(:,i) + B(i); endend
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -