matlab
大型智力游戏
改BUG,大型智力游戏现场
展开
-
脉冲压缩
T = 7.24e-6; % 信号持续时间B = 5.8e6; % 信号带宽K = B/T; % 调频率ratio = 10; % 过采样率Fs = ratio*B; % 采样频率dt = 1/Fs; ...原创 2018-09-27 09:56:11 · 9102 阅读 · 0 评论 -
jpeg2im.m
function x = jpeg2im(y) %IM2JPEG Compresses an image using a JPEG approximation.% Y = IM2JPEG(X, QUALITY) compresses image X based on 8 x 8 DCT% transforms, coefficient quantization, and Huffm...原创 2018-08-03 11:41:53 · 928 阅读 · 0 评论 -
im2jpeg.m
function y = im2jpeg(x, quality,bits) %IM2JPEG Compresses an image using a JPEG approximation.% Y = IM2JPEG(X, QUALITY) compresses image X based on 8 x 8 DCT% transforms, coefficient quantizat...原创 2018-08-03 11:09:12 · 1278 阅读 · 0 评论 -
tofloat.m
function [out,revertclass] = tofloat(inputimage)%Copy the book of Gonzalesidentify = @(x) x;tosingle = @im2single;table = {'uint8',tosingle,@im2uint8 'uint16',tosingle,@im2uint16 ...原创 2018-08-03 11:42:11 · 1924 阅读 · 0 评论 -
dftfilt.m
function g = dftfilt( f,H,classout )[f,revertClass]=tofloat(f);F=fft2(f,size(H,1),size(H,2));g=ifft2(H.*F);g=g(1:size(f,1),1:size(f,2));if nargin==2 || strcmp(classout,'original') g=revertCl...原创 2018-08-02 11:52:34 · 3393 阅读 · 0 评论 -
count_factors.m
function r = count_factors( n )%UNTITLED7 此处显示有关此函数的摘要% 此处显示详细说明count=0;for i=1:n if mod(n,i)==0 count =count+1; endendr=count;end ...原创 2018-08-02 11:51:34 · 178 阅读 · 0 评论 -
colorseg.m
function I = colorseg(varargin)%COLORSEG Performs segmentation of a color image.% S = COLORSEG('EUCLIDEAN', F, T, M) performs segmentation of color% image F using a Euclidean measure of simila...原创 2018-08-02 11:50:51 · 1670 阅读 · 0 评论 -
colorgrad.m
function [VG,A,PPG]=colorgrad(f,T)%COLORGRAD Computes the vector gradient of an RGB image. % [VG, VA, PPG] = COLORGRAD(F, T) computes the vector gradient, VG, % and corresponding angle array, ...原创 2018-08-02 11:49:47 · 1800 阅读 · 0 评论 -
huffman.m
function CODE =huffman(p) error(nargchk(1,1,nargin));if (ndims(p)~=2) ||(min(size(p))>1)||~isreal(p)||~isnumeric(p) error('P must be a real numeric vector.'); end global CODECODE=cell(leng...原创 2018-08-02 11:08:09 · 549 阅读 · 0 评论 -
mat2huff.m
function y=mat2huff(x)if ndims(x)~=2||~isreal(x)||(~isnumeric(x)&&~islogical(x)) error('X must be a 2-D real numeric or logical matrix.');endy.size=uint32(size(x));x=round(double(x));...原创 2018-08-02 11:07:34 · 1922 阅读 · 0 评论 -
huff2mat.m
function x=huff2mat(y)if ~isstruct(y)||~isfield(y,'min')||~isfield(y,'size')||... ~isfield(y,'hist')||~isfield(y,'code') error('The inpyt muxt be a structure as returned by MAT2HUFF.');...原创 2018-08-02 11:03:45 · 2204 阅读 · 1 评论 -
mat2lpc.m
function x = mat2lpc( x,f )error(nargchk(1,2,nargin));if nargin<2 f=1;endx=double(x);[m,n]=size(x);xs=x; zc=zeros(m,1);p=zeros(m,n);for j=1:length(f) xs=[zc xs(:,1:end-1)]; ...原创 2018-08-02 10:53:58 · 497 阅读 · 0 评论 -
lpc2mat.m
function x = lpc2mat( y,f )error(nargchk(1,2,nargin));if nargin<2 f=1;endf=f(end:-1:1);[m,n]=size(y);order=length(f);f=repmat(f,m,1);x=zeros(m,n+order);for j=1:n jj=j+order; x...原创 2018-08-02 10:53:20 · 348 阅读 · 0 评论 -
quantize.m
function y = quantize( x,b,type )error(nargchk(2,3,nargin));if ndims(x)~=2||~isreal(x)||~isnumeric(x)||~isa(x,'uint8') error('The inpyt muxt be a UINT8 numeric matrix.');endlo=uint8(2^(8-b)-...原创 2018-08-02 10:52:35 · 221 阅读 · 0 评论 -
arrayfun函数用法
1、arrayfun(n输入函数func,数组A1,数组A2...数组An)的输出将是一个列表,列表中的第i个元素为func(A1(i),A2(i),...An(i))。因此,各个数组和返回数组都是相同尺寸的。2、arrayfun可以有多个输出。输出取决于传入的函数的返回值个数。如图,自己在当前目录下的MyF.m文件中实现了3返回值,2输入函数MyF,则arrayfun函数要传入两...转载 2019-07-01 17:27:58 · 9828 阅读 · 0 评论