?? ovadd.m
字號:
clc;
clear all;
close all;
x=input('enter x:');
h=input('enter h:');
xl=length(x);
hl=length(h);
k=mod(xl,hl);
if k~=0
x=[x zeros(1,2*hl-1-k)];
end
h=[h zeros(1,hl-1)];
z=zeros(1,xl+hl-1);
for i=1:hl:length(x)-hl+1
p(1:hl)=x(i:i+hl-1);
p(hl+1:2*hl-1)=0;
[q]=circular(p,h);
q=q';
z(i:i+hl-2)=z(i:i+hl-2)+q(1:hl-1);
z(i+hl-1:i+2*hl-2)=q(hl:2*hl-1);
end
y(1:xl+hl-1)=z(1:xl+hl-1);
display(y)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -