📄 binvec2quadvec.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -