Has anybody seen PowerBasic-algoritms for:
1) solving non-linear systems
2) solving (large) linear systems
3) FFT
Regards
Peter
1) solving non-linear systems
2) solving (large) linear systems
3) FFT
Regards
Peter
DECLARE FUNCTION bitRev&(j&,nu&) FUNCTION bitRev&(j&,nu&) j1&=j& k&=0 FOR i&=1 TO nu& j2&=j1&\2 k&=k&*2+j1&-2*j2& j1&=j2& NEXT i& FUNCTION=k& END FUNCTION SUB newFFT(ftr AS DOUBLE PTR, fti AS DOUBLE PTR, jmax&,nu&) n2&=jmax&\2 nu1&=nu&-1 k&=0 dw#=2*pi#/jmax& FOR l&=1 TO nu& pt&=1 SHIFT LEFT pt&,nu1& DO WHILE k&<jmax& FOR i&=1 TO n2& p#=bitRev(k&\pt&,nu&) arg#=p#*dw# c#=COS(arg#) s#=SIN(arg#) trl#[email protected][k&+n2&]*c#[email protected][k&+n2&]*s# tim#[email protected][k&+n2&]*c#[email protected][k&+n2&]*s# @ftr[k&+n2&][email protected][k&]-trl# @fti[k&+n2&][email protected][k&]-tim# @ftr[k&][email protected][k&]+trl# @fti[k&][email protected][k&]+tim# INCR k& NEXT i& k&=k&+n2& LOOP k&=0 nu1&=nu1&-1 n2&=n2&\2 NEXT l& k&=0 DO WHILE k&<jmax& i&=bitRev&(k&,nu&) IF i&>k& THEN trl#[email protected][k&] tim#[email protected][k&] @ftr[k&][email protected][i&] @fti[k&][email protected][i&] @ftr[i&]=trl# @fti[i&]=tim# END IF INCR k& LOOP END SUB
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment