Demo entry 6642488

py

   

Submitted by anonymous on Sep 24, 2017 at 12:33
Language: Matlab. Code size: 349 Bytes.

function [xe,xo,m]=evenodd_C(x,n)
    m=-fliplr(n);
    m1=min([m,n]);m2=max([m,n]);m=m1:m2;
    nm=n(1)-m(1);
    x1=zeros(1,length(m))+ones(1,length(m))*1j;
    x2=zeros(1,length(m))+ones(1,length(m))*1j;%%将数组声明为复数类型
    n1=1:length(n);
    x1(n1+nm)=conj(x);
    x2(n1+nm)=x;
    xe=0.5*(x2+fliplr(x1));
    xo=0.5*(x2-fliplr(x1));
end

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).