bluenut
Programmer
- Dec 27, 2004
- 6
I ran accross this piece of code with what appears to be range notation which I need to convert to C.
beta = 0:2*pi/Np:2*pi;
xc = 0.5*(1+cos(beta));
yt = acoef(1)*sqrt(xc)+xc.*(acoef(2)+xc.*(acoef(3)+xc.*(acoef(4)+acoef(5)*xc)));
yt(Np/2+2:Np+1) = -yt(Np/2:-1:1);
* Np is interger
* acoef array of coefficients.
* beta, xc, yt arrays
Any ideas would be appreciated.
beta = 0:2*pi/Np:2*pi;
xc = 0.5*(1+cos(beta));
yt = acoef(1)*sqrt(xc)+xc.*(acoef(2)+xc.*(acoef(3)+xc.*(acoef(4)+acoef(5)*xc)));
yt(Np/2+2:Np+1) = -yt(Np/2:-1:1);
* Np is interger
* acoef array of coefficients.
* beta, xc, yt arrays
Any ideas would be appreciated.