lut.m
来自「一个查找表的程序」· M 代码 · 共 42 行
M
42 行
%LUT operation%% performs LUT on an array: B[k] = A[LUT[k]]% % Usage:% B = mylut(A, LUT)% % Inputs:% A: indexing into the LUT, MATLAB indexing starting from 1. % values less than one or greater than length(LUT) are IGNORED.% A may also be of class single/double - non integer values are cast to int (fractions are ignored).% LUT a one dimensional vector% Output:% B: A after the LUT, same class as LUT.% % To compile the c++ source into Matlab mex file:% 1. setup you mex compiler:% >> mex -setup% 2. Compile:% >> mex -O LUT.cpp%% % Copyright (c) Bagon Shai% Department of Computer Science and Applied Mathmatics% Wiezmann Institute of Science% http://www.wisdom.weizmann.ac.il/% % Permission is hereby granted, free of charge, to any person obtaining a copy% of this software and associated documentation files (the "Software"), to deal% in the Software without restriction, subject to the following conditions:% % 1. The above copyright notice and this permission notice shall be included in % all copies or substantial portions of the Software.% 2. No commercial use will be done with this software.% 3. If used in an academic framework - a proper citation must be included.% % The Software is provided "as is", without warranty of any kind.% % Mar. 2007% % Implemented in a MATLAB mex file.%#mex
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?