binvec2quadvec.m

来自「本程序利用改进的CHOW算法」· M 代码 · 共 22 行

M
22
字号
function b=binvec2quadvec(a)%pass a binary vector the result is a quad vector b(0,1,2,3)%if a's length is odd, adds a zero at the first of a%This software is protected under international copyright laws.%Violaters will be prosecuted to the furthest extent of the law.%Copyright 1999 - Joe Williams, Dr. Geoffrey Orsak, Southern %                 Methodist University. ALL RIGHTS RESERVED.
%DO NOT use code without author(s) permissionif mod(length(a),2)==0b=zeros(1,length(a)/2);for c=1:2:length(a)b(c/2+.5)=2*a(c)+a(c+1);endelseb=zeros(1,(length(a)+1)/2);b(1)=a(1);for c=2:2:length(a)b(c/2+1)=2*a(c)+a(c+1);endend

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?