diff options
Diffstat (limited to 'macros')
-rw-r--r-- | macros/ac2poly.bin | bin | 4088 -> 0 bytes | |||
-rw-r--r-- | macros/ac2rc.bin | bin | 4784 -> 0 bytes | |||
-rw-r--r-- | macros/arParEst.bin | bin | 8568 -> 0 bytes | |||
-rw-r--r-- | macros/arburg.bin | bin | 8912 -> 0 bytes | |||
-rw-r--r-- | macros/arch_rnd.sci | 43 | ||||
-rw-r--r-- | macros/arcov.bin | bin | 3768 -> 0 bytes | |||
-rw-r--r-- | macros/arma_rnd.sci | 52 | ||||
-rw-r--r-- | macros/armcov.bin | bin | 1856 -> 0 bytes | |||
-rw-r--r-- | macros/aryule.bin | bin | 4604 -> 0 bytes | |||
-rw-r--r-- | macros/barthannwin.bin | bin | 2764 -> 0 bytes | |||
-rw-r--r-- | macros/bartlett.bin | bin | 4428 -> 0 bytes | |||
-rw-r--r-- | macros/besselap.bin | bin | 4340 -> 0 bytes | |||
-rw-r--r-- | macros/besself.bin | bin | 8972 -> 0 bytes | |||
-rw-r--r-- | macros/bitrevorder.bin | bin | 2920 -> 0 bytes | |||
-rw-r--r-- | macros/blackman.bin | bin | 8188 -> 0 bytes | |||
-rw-r--r-- | macros/blackmanharris.bin | bin | 4300 -> 0 bytes | |||
-rw-r--r-- | macros/blackmannuttall.bin | bin | 4312 -> 0 bytes | |||
-rw-r--r-- | macros/bohmanwin.bin | bin | 2548 -> 0 bytes | |||
-rw-r--r-- | macros/boxcar.bin | bin | 2568 -> 0 bytes | |||
-rw-r--r-- | macros/buffer.bin | bin | 6876 -> 0 bytes | |||
-rw-r--r-- | macros/buttap.bin | bin | 4104 -> 0 bytes | |||
-rw-r--r-- | macros/butter.bin | bin | 10144 -> 0 bytes | |||
-rw-r--r-- | macros/buttord.bin | bin | 6968 -> 0 bytes | |||
-rw-r--r-- | macros/cceps.bin | bin | 1332 -> 0 bytes | |||
-rw-r--r-- | macros/cconv.bin | bin | 7392 -> 0 bytes | |||
-rw-r--r-- | macros/cell2sos.bin | bin | 10336 -> 0 bytes | |||
-rw-r--r-- | macros/cheb.bin | bin | 3404 -> 0 bytes | |||
-rw-r--r-- | macros/cheb1ap.bin | bin | 5508 -> 0 bytes | |||
-rw-r--r-- | macros/cheb1ord.bin | bin | 7028 -> 0 bytes | |||
-rw-r--r-- | macros/cheb2ap.bin | bin | 4056 -> 0 bytes | |||
-rw-r--r-- | macros/cheb2ord.bin | bin | 7092 -> 0 bytes | |||
-rw-r--r-- | macros/chebwin.bin | bin | 3908 -> 0 bytes | |||
-rw-r--r-- | macros/cheby1.bin | bin | 11136 -> 0 bytes | |||
-rw-r--r-- | macros/cheby2.bin | bin | 11164 -> 0 bytes | |||
-rw-r--r-- | macros/check.bin | bin | 476 -> 0 bytes | |||
-rw-r--r-- | macros/chirp.bin | bin | 7252 -> 0 bytes | |||
-rw-r--r-- | macros/cl2bp.sci | 47 | ||||
-rw-r--r-- | macros/clustersegment.bin | bin | 4108 -> 0 bytes | |||
-rw-r--r-- | macros/cmorwavf.bin | bin | 3696 -> 0 bytes | |||
-rw-r--r-- | macros/convmtx.bin | bin | 2884 -> 0 bytes | |||
-rw-r--r-- | macros/corrmtx.bin | bin | 20444 -> 0 bytes | |||
-rw-r--r-- | macros/cplxreal.bin | bin | 5940 -> 0 bytes | |||
-rw-r--r-- | macros/cplxreal.sci | 5 | ||||
-rw-r--r-- | macros/cummax.bin | bin | 22500 -> 0 bytes | |||
-rw-r--r-- | macros/cummin.bin | bin | 23096 -> 0 bytes | |||
-rw-r--r-- | macros/czt.bin | bin | 2164 -> 0 bytes | |||
-rw-r--r-- | macros/db.bin | bin | 22844 -> 0 bytes | |||
-rw-r--r-- | macros/db2pow.bin | bin | 3012 -> 0 bytes | |||
-rw-r--r-- | macros/dctmtx.bin | bin | 3448 -> 0 bytes | |||
-rw-r--r-- | macros/decimate.bin | bin | 4888 -> 0 bytes | |||
-rw-r--r-- | macros/dftmtx.bin | bin | 3464 -> 0 bytes | |||
-rw-r--r-- | macros/diric.bin | bin | 2524 -> 0 bytes | |||
-rw-r--r-- | macros/downsample.bin | bin | 4204 -> 0 bytes | |||
-rw-r--r-- | macros/dst1.bin | bin | 1360 -> 0 bytes | |||
-rw-r--r-- | macros/dutycycle.bin | bin | 65420 -> 0 bytes | |||
-rw-r--r-- | macros/ellip.bin | bin | 12252 -> 0 bytes | |||
-rw-r--r-- | macros/ellipap.bin | bin | 5264 -> 0 bytes | |||
-rw-r--r-- | macros/ellipord.bin | bin | 7156 -> 0 bytes | |||
-rw-r--r-- | macros/enbw.bin | bin | 5076 -> 0 bytes | |||
-rw-r--r-- | macros/eqtflength.bin | bin | 4864 -> 0 bytes | |||
-rw-r--r-- | macros/falltime.bin | bin | 57524 -> 0 bytes | |||
-rw-r--r-- | macros/fft.bin | bin | 6080 -> 0 bytes | |||
-rw-r--r-- | macros/fft1.sci (renamed from macros/fft.sci) | 4 | ||||
-rw-r--r-- | macros/fft2.bin | bin | 5292 -> 0 bytes | |||
-rw-r--r-- | macros/fft21.sci (renamed from macros/fft2.sci) | 4 | ||||
-rw-r--r-- | macros/fftfilt.bin | bin | 25776 -> 0 bytes | |||
-rw-r--r-- | macros/fftw1.sci | 64 | ||||
-rw-r--r-- | macros/fht.bin | bin | 1584 -> 0 bytes | |||
-rw-r--r-- | macros/filternorm.bin | bin | 18100 -> 0 bytes | |||
-rw-r--r-- | macros/filtfilt.bin | bin | 3720 -> 0 bytes | |||
-rw-r--r-- | macros/filtic.bin | bin | 4640 -> 0 bytes | |||
-rw-r--r-- | macros/filtord.bin | bin | 8580 -> 0 bytes | |||
-rw-r--r-- | macros/firpmord.bin | bin | 33892 -> 0 bytes | |||
-rw-r--r-- | macros/firtype.bin | bin | 3900 -> 0 bytes | |||
-rw-r--r-- | macros/flattopwin.bin | bin | 5388 -> 0 bytes | |||
-rw-r--r-- | macros/fracshift.bin | bin | 4636 -> 0 bytes | |||
-rw-r--r-- | macros/freqs.bin | bin | 3628 -> 0 bytes | |||
-rw-r--r-- | macros/fwhm.bin | bin | 6544 -> 0 bytes | |||
-rw-r--r-- | macros/fwhmjlt.bin | bin | 2412 -> 0 bytes | |||
-rw-r--r-- | macros/fwht.bin | bin | 1672 -> 0 bytes | |||
-rw-r--r-- | macros/gauspuls.bin | bin | 3792 -> 0 bytes | |||
-rw-r--r-- | macros/gaussdesign.bin | bin | 15776 -> 0 bytes | |||
-rw-r--r-- | macros/gaussian.bin | bin | 4004 -> 0 bytes | |||
-rw-r--r-- | macros/gausswin.bin | bin | 3988 -> 0 bytes | |||
-rw-r--r-- | macros/gmonopuls.bin | bin | 3160 -> 0 bytes | |||
-rw-r--r-- | macros/goertzel.bin | bin | 13476 -> 0 bytes | |||
-rw-r--r-- | macros/grpdelay.bin | bin | 7960 -> 0 bytes | |||
-rw-r--r-- | macros/hann.bin | bin | 4488 -> 0 bytes | |||
-rw-r--r-- | macros/helperHarmonicDistortionAmplifier.bin | bin | 3304 -> 0 bytes | |||
-rw-r--r-- | macros/hilbert1.bin | bin | 1704 -> 0 bytes | |||
-rw-r--r-- | macros/hurst.bin | bin | 1060 -> 0 bytes | |||
-rw-r--r-- | macros/icceps.bin | bin | 5604 -> 0 bytes | |||
-rw-r--r-- | macros/idct1.bin | bin | 1308 -> 0 bytes | |||
-rw-r--r-- | macros/idct2.bin | bin | 1676 -> 0 bytes | |||
-rw-r--r-- | macros/idst1.bin | bin | 1340 -> 0 bytes | |||
-rw-r--r-- | macros/ifft.bin | bin | 6476 -> 0 bytes | |||
-rw-r--r-- | macros/ifft1.sci (renamed from macros/ifft.sci) | 4 | ||||
-rw-r--r-- | macros/ifft2.bin | bin | 6016 -> 0 bytes | |||
-rw-r--r-- | macros/ifft21.sci (renamed from macros/ifft2.sci) | 4 | ||||
-rw-r--r-- | macros/ifht.bin | bin | 1628 -> 0 bytes | |||
-rw-r--r-- | macros/ifwht.bin | bin | 1684 -> 0 bytes | |||
-rw-r--r-- | macros/iirlp2mb.bin | bin | 6892 -> 0 bytes | |||
-rw-r--r-- | macros/impinvar.bin | bin | 5392 -> 0 bytes | |||
-rw-r--r-- | macros/impz.bin | bin | 4780 -> 0 bytes | |||
-rw-r--r-- | macros/impzlength.bin | bin | 29200 -> 0 bytes | |||
-rw-r--r-- | macros/interp.bin | bin | 4924 -> 0 bytes | |||
-rw-r--r-- | macros/intfilt.bin | bin | 31572 -> 0 bytes | |||
-rw-r--r-- | macros/invfreq.bin | bin | 2520 -> 0 bytes | |||
-rw-r--r-- | macros/invfreqs.sci | 96 | ||||
-rw-r--r-- | macros/invfreqz.sci | 94 | ||||
-rw-r--r-- | macros/invimpinvar.bin | bin | 5660 -> 0 bytes | |||
-rw-r--r-- | macros/is2rc.bin | bin | 4088 -> 0 bytes | |||
-rw-r--r-- | macros/isallpass.bin | bin | 17432 -> 0 bytes | |||
-rw-r--r-- | macros/isfir.bin | bin | 6172 -> 0 bytes | |||
-rw-r--r-- | macros/islinphase.bin | bin | 14592 -> 0 bytes | |||
-rw-r--r-- | macros/ismaxphase.bin | bin | 8576 -> 0 bytes | |||
-rw-r--r-- | macros/isminphase.bin | bin | 8648 -> 0 bytes | |||
-rw-r--r-- | macros/isstable.bin | bin | 9400 -> 0 bytes | |||
-rw-r--r-- | macros/kaiser.bin | bin | 3968 -> 0 bytes | |||
-rw-r--r-- | macros/kaiserord.sci | 70 | ||||
-rw-r--r-- | macros/lar2rc.bin | bin | 3756 -> 0 bytes | |||
-rw-r--r-- | macros/latc2tf.bin | bin | 24820 -> 0 bytes | |||
-rw-r--r-- | macros/latcfilt.bin | bin | 13240 -> 0 bytes | |||
-rw-r--r-- | macros/latcfilt1.bin | bin | 4664 -> 0 bytes | |||
-rw-r--r-- | macros/levdown.bin | bin | 1436 -> 0 bytes | |||
-rw-r--r-- | macros/levin.bin | bin | 6200 -> 0 bytes | |||
-rw-r--r-- | macros/levinson.bin | bin | 9180 -> 0 bytes | |||
-rw-r--r-- | macros/lib | bin | 5528 -> 6440 bytes | |||
-rw-r--r-- | macros/lpc.bin | bin | 21268 -> 0 bytes | |||
-rw-r--r-- | macros/lsf2poly.bin | bin | 8420 -> 0 bytes | |||
-rw-r--r-- | macros/mag2db.bin | bin | 1476 -> 0 bytes | |||
-rw-r--r-- | macros/marcumq.bin | bin | 5440 -> 0 bytes | |||
-rw-r--r-- | macros/medfilt1.bin | bin | 43316 -> 0 bytes | |||
-rw-r--r-- | macros/mexihat.bin | bin | 3312 -> 0 bytes | |||
-rw-r--r-- | macros/meyeraux.bin | bin | 2680 -> 0 bytes | |||
-rw-r--r-- | macros/midcross.bin | bin | 59888 -> 0 bytes | |||
-rw-r--r-- | macros/modulate.bin | bin | 29888 -> 0 bytes | |||
-rw-r--r-- | macros/morlet.bin | bin | 3412 -> 0 bytes | |||
-rw-r--r-- | macros/movingrms.bin | bin | 4524 -> 0 bytes | |||
-rw-r--r-- | macros/musicBase.bin | bin | 22512 -> 0 bytes | |||
-rw-r--r-- | macros/names | 24 | ||||
-rw-r--r-- | macros/ncauer.bin | bin | 5372 -> 0 bytes | |||
-rw-r--r-- | macros/nnls.bin | bin | 7612 -> 0 bytes | |||
-rw-r--r-- | macros/nuttallwin.bin | bin | 4108 -> 0 bytes | |||
-rw-r--r-- | macros/parzenwin.bin | bin | 2512 -> 0 bytes | |||
-rw-r--r-- | macros/pburg.sci | 93 | ||||
-rw-r--r-- | macros/pchip.bin | bin | 16320 -> 0 bytes | |||
-rw-r--r-- | macros/pchips.bin | bin | 8524 -> 0 bytes | |||
-rw-r--r-- | macros/peak2peak.bin | bin | 14012 -> 0 bytes | |||
-rw-r--r-- | macros/peak2rms.bin | bin | 13896 -> 0 bytes | |||
-rw-r--r-- | macros/pei_tseng_notch.bin | bin | 5436 -> 0 bytes | |||
-rw-r--r-- | macros/peig.bin | bin | 27724 -> 0 bytes | |||
-rw-r--r-- | macros/periodogram.bin | bin | 2392 -> 0 bytes | |||
-rw-r--r-- | macros/phaseInputParseAs_ab.bin | bin | 16256 -> 0 bytes | |||
-rw-r--r-- | macros/phaseInputParseAs_sos.bin | bin | 14480 -> 0 bytes | |||
-rw-r--r-- | macros/phasedelay.bin | bin | 15784 -> 0 bytes | |||
-rw-r--r-- | macros/phasez.bin | bin | 12092 -> 0 bytes | |||
-rw-r--r-- | macros/pmusic.bin | bin | 30784 -> 0 bytes | |||
-rw-r--r-- | macros/poly2ac.bin | bin | 5492 -> 0 bytes | |||
-rw-r--r-- | macros/poly2lsf.bin | bin | 12052 -> 0 bytes | |||
-rw-r--r-- | macros/poly2rc.bin | bin | 7644 -> 0 bytes | |||
-rw-r--r-- | macros/polyscale.bin | bin | 1352 -> 0 bytes | |||
-rw-r--r-- | macros/polystab.bin | bin | 2372 -> 0 bytes | |||
-rw-r--r-- | macros/polyval.bin | bin | 10356 -> 0 bytes | |||
-rw-r--r-- | macros/pow2db.bin | bin | 2544 -> 0 bytes | |||
-rw-r--r-- | macros/primitive.bin | bin | 3912 -> 0 bytes | |||
-rw-r--r-- | macros/prony.bin | bin | 3836 -> 0 bytes | |||
-rw-r--r-- | macros/pulseperiod.bin | bin | 63340 -> 0 bytes | |||
-rw-r--r-- | macros/pulsesep.bin | bin | 62568 -> 0 bytes | |||
-rw-r--r-- | macros/pulsewidth.bin | bin | 59276 -> 0 bytes | |||
-rw-r--r-- | macros/pulstran.bin | bin | 6000 -> 0 bytes | |||
-rw-r--r-- | macros/pyulear.sci | 85 | ||||
-rw-r--r-- | macros/qp_kaiser.sci | 37 | ||||
-rw-r--r-- | macros/rc2ac.bin | bin | 4936 -> 0 bytes | |||
-rw-r--r-- | macros/rc2is.bin | bin | 6072 -> 0 bytes | |||
-rw-r--r-- | macros/rc2lar.bin | bin | 3260 -> 0 bytes | |||
-rw-r--r-- | macros/rc2poly.bin | bin | 5668 -> 0 bytes | |||
-rw-r--r-- | macros/rceps.bin | bin | 1576 -> 0 bytes | |||
-rw-r--r-- | macros/rcosdesign.bin | bin | 24832 -> 0 bytes | |||
-rw-r--r-- | macros/rectpuls.bin | bin | 3744 -> 0 bytes | |||
-rw-r--r-- | macros/rectwin.bin | bin | 2468 -> 0 bytes | |||
-rw-r--r-- | macros/remez1.bin | bin | 2424 -> 0 bytes | |||
-rw-r--r-- | macros/resample.bin | bin | 5912 -> 0 bytes | |||
-rw-r--r-- | macros/residued.bin | bin | 4432 -> 0 bytes | |||
-rw-r--r-- | macros/residuez.bin | bin | 3692 -> 0 bytes | |||
-rw-r--r-- | macros/risetime.bin | bin | 57484 -> 0 bytes | |||
-rw-r--r-- | macros/rlevinson.bin | bin | 15408 -> 0 bytes | |||
-rw-r--r-- | macros/rms.bin | bin | 2856 -> 0 bytes | |||
-rw-r--r-- | macros/rooteig.bin | bin | 39372 -> 0 bytes | |||
-rw-r--r-- | macros/rootmusic.bin | bin | 39616 -> 0 bytes | |||
-rw-r--r-- | macros/rssq.bin | bin | 9540 -> 0 bytes | |||
-rw-r--r-- | macros/sampled2continuous.bin | bin | 3324 -> 0 bytes | |||
-rw-r--r-- | macros/sawtooth.bin | bin | 3656 -> 0 bytes | |||
-rw-r--r-- | macros/schtrig.bin | bin | 3696 -> 0 bytes | |||
-rw-r--r-- | macros/schurrc.bin | bin | 6100 -> 0 bytes | |||
-rw-r--r-- | macros/seqperiod.bin | bin | 9968 -> 0 bytes | |||
-rw-r--r-- | macros/sftrans.sci | 74 | ||||
-rw-r--r-- | macros/sgolay.bin | bin | 4648 -> 0 bytes | |||
-rw-r--r-- | macros/sgolayfilt.bin | bin | 7028 -> 0 bytes | |||
-rw-r--r-- | macros/shanwavf.bin | bin | 5360 -> 0 bytes | |||
-rw-r--r-- | macros/shiftdata.bin | bin | 7156 -> 0 bytes | |||
-rw-r--r-- | macros/sigmoid_train.bin | bin | 1208 -> 0 bytes | |||
-rw-r--r-- | macros/sinetone.bin | bin | 2132 -> 0 bytes | |||
-rw-r--r-- | macros/sinewave.bin | bin | 1720 -> 0 bytes | |||
-rw-r--r-- | macros/slewrate.bin | bin | 57676 -> 0 bytes | |||
-rw-r--r-- | macros/sos2cell.bin | bin | 10944 -> 0 bytes | |||
-rw-r--r-- | macros/sos2ss.bin | bin | 6896 -> 0 bytes | |||
-rw-r--r-- | macros/sos2tf.bin | bin | 3880 -> 0 bytes | |||
-rw-r--r-- | macros/sos2zp.bin | bin | 4964 -> 0 bytes | |||
-rw-r--r-- | macros/sosbreak.bin | bin | 4340 -> 0 bytes | |||
-rw-r--r-- | macros/sosfilt.bin | bin | 2576 -> 0 bytes | |||
-rw-r--r-- | macros/specgram.bin | bin | 2692 -> 0 bytes | |||
-rw-r--r-- | macros/spectral_adf.bin | bin | 1768 -> 0 bytes | |||
-rw-r--r-- | macros/spectral_xdf.bin | bin | 1768 -> 0 bytes | |||
-rw-r--r-- | macros/spencer.bin | bin | 1076 -> 0 bytes | |||
-rw-r--r-- | macros/ss2sos.bin | bin | 12568 -> 0 bytes | |||
-rw-r--r-- | macros/statelevels.bin | bin | 38016 -> 0 bytes | |||
-rw-r--r-- | macros/stft.bin | bin | 5464 -> 0 bytes | |||
-rw-r--r-- | macros/stmcb.bin | bin | 8140 -> 0 bytes | |||
-rw-r--r-- | macros/strips.bin | bin | 17232 -> 0 bytes | |||
-rw-r--r-- | macros/subspaceMethodsInputParser.bin | bin | 38972 -> 0 bytes | |||
-rw-r--r-- | macros/synthesis.bin | bin | 1256 -> 0 bytes | |||
-rw-r--r-- | macros/tf2sos.bin | bin | 4912 -> 0 bytes | |||
-rw-r--r-- | macros/tf2zp.bin | bin | 7056 -> 0 bytes | |||
-rw-r--r-- | macros/tf2zpk.bin | bin | 944 -> 0 bytes | |||
-rw-r--r-- | macros/tfestimate.sci | 93 | ||||
-rw-r--r-- | macros/transpose.bin | bin | 404 -> 0 bytes | |||
-rw-r--r-- | macros/trial_iirlp2mb.bin | bin | 4224 -> 0 bytes | |||
-rw-r--r-- | macros/triang.bin | bin | 2748 -> 0 bytes | |||
-rw-r--r-- | macros/tripuls.bin | bin | 4540 -> 0 bytes | |||
-rw-r--r-- | macros/truth.bin | bin | 240 -> 0 bytes | |||
-rw-r--r-- | macros/tukeywin.bin | bin | 3748 -> 0 bytes | |||
-rw-r--r-- | macros/udecode.bin | bin | 10412 -> 0 bytes | |||
-rw-r--r-- | macros/uencode.bin | bin | 12728 -> 0 bytes | |||
-rw-r--r-- | macros/ultrwin.bin | bin | 6664 -> 0 bytes | |||
-rw-r--r-- | macros/unshiftdata.bin | bin | 6916 -> 0 bytes | |||
-rw-r--r-- | macros/upfirdn.bin | bin | 2776 -> 0 bytes | |||
-rw-r--r-- | macros/upsample.bin | bin | 4128 -> 0 bytes | |||
-rw-r--r-- | macros/upsamplefill.bin | bin | 4524 -> 0 bytes | |||
-rw-r--r-- | macros/var.bin | bin | 22564 -> 0 bytes | |||
-rw-r--r-- | macros/vco.bin | bin | 7248 -> 0 bytes | |||
-rw-r--r-- | macros/wconv.bin | bin | 3416 -> 0 bytes | |||
-rw-r--r-- | macros/welchwin.bin | bin | 4408 -> 0 bytes | |||
-rw-r--r-- | macros/window.bin | bin | 3804 -> 0 bytes | |||
-rw-r--r-- | macros/wkeep.bin | bin | 3804 -> 0 bytes | |||
-rw-r--r-- | macros/wrev.bin | bin | 2264 -> 0 bytes | |||
-rw-r--r-- | macros/xcorr1.sci | 86 | ||||
-rw-r--r-- | macros/xcorr2.bin | bin | 2496 -> 0 bytes | |||
-rw-r--r-- | macros/xcov1.bin | bin | 1708 -> 0 bytes | |||
-rw-r--r-- | macros/yulewalker.bin | bin | 1924 -> 0 bytes | |||
-rw-r--r-- | macros/zerocrossing.bin | bin | 2284 -> 0 bytes | |||
-rw-r--r-- | macros/zp2sos.bin | bin | 6280 -> 0 bytes | |||
-rw-r--r-- | macros/zp2ss.bin | bin | 5916 -> 0 bytes | |||
-rw-r--r-- | macros/zp2tf.bin | bin | 4116 -> 0 bytes | |||
-rw-r--r-- | macros/zplane.bin | bin | 1328 -> 0 bytes |
255 files changed, 964 insertions, 15 deletions
diff --git a/macros/ac2poly.bin b/macros/ac2poly.bin Binary files differdeleted file mode 100644 index 5a1a177..0000000 --- a/macros/ac2poly.bin +++ /dev/null diff --git a/macros/ac2rc.bin b/macros/ac2rc.bin Binary files differdeleted file mode 100644 index 5bb60cf..0000000 --- a/macros/ac2rc.bin +++ /dev/null diff --git a/macros/arParEst.bin b/macros/arParEst.bin Binary files differdeleted file mode 100644 index 354bcea..0000000 --- a/macros/arParEst.bin +++ /dev/null diff --git a/macros/arburg.bin b/macros/arburg.bin Binary files differdeleted file mode 100644 index d0865cb..0000000 --- a/macros/arburg.bin +++ /dev/null diff --git a/macros/arch_rnd.sci b/macros/arch_rnd.sci new file mode 100644 index 0000000..50facc4 --- /dev/null +++ b/macros/arch_rnd.sci @@ -0,0 +1,43 @@ +function res = arch_rnd (a, b, t) +//Simulate an ARCH sequence of length t with AR coefficients b and CH coefficients a. +//Calling Sequence +//arch_rnd (a, b, t) +//Parameters +//a: CH coefficients +//b: AR coefficients +//t: Length of ARCH sequence +//Description +//This is an Octave function. +//It Simulates an ARCH sequence of length t with AR coefficients b and CH coefficients a. +//The result y(t) follows the model +// +//y(t) = b(1) + b(2) * y(t-1) + … + b(lb) * y(t-lb+1) + e(t), +//where e(t), given y up to time t-1, is N(0, h(t)), with +// +//h(t) = a(1) + a(2) * e(t-1)^2 + … + a(la) * e(t-la+1)^2 +//Examples +//a = [1 2 3 4 5]; +//b = [7 8 9 10]; +//arch_rnd (a, b, t) +//ans = +// +// 6.1037e+00 +// 5.7294e+01 +// 5.7390e+02 +// 6.3063e+03 +// 6.8695e+04 + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 3 | rhs > 3) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 3 then + res = callOctave("arch_rnd",a, b, t) + + end +endfunction diff --git a/macros/arcov.bin b/macros/arcov.bin Binary files differdeleted file mode 100644 index 2c23d8e..0000000 --- a/macros/arcov.bin +++ /dev/null diff --git a/macros/arma_rnd.sci b/macros/arma_rnd.sci new file mode 100644 index 0000000..bc826f4 --- /dev/null +++ b/macros/arma_rnd.sci @@ -0,0 +1,52 @@ +function res = arma_rnd (a, b, v, t, n) +//Return a simulation of the ARMA model. +//Calling Sequence +//arma_rnd (a, b, v, t, n) +//arma_rnd (a, b, v, t) +//Parameters +//a: vector +//b: vector +//v: Variance +//t: Length of output vector +//n: Number of dummy x(i) used for initialization +//Description +//This is an Octave function. +//The ARMA model is defined by +// +//x(n) = a(1) * x(n-1) + … + a(k) * x(n-k) +// + e(n) + b(1) * e(n-1) + … + b(l) * e(n-l) +//in which k is the length of vector a, l is the length of vector b and e is Gaussian white noise with variance v. The function returns a vector of length t. +// +//The optional parameter n gives the number of dummy x(i) used for initialization, i.e., a sequence of length t+n is generated and x(n+1:t+n) is returned. If n is omitted, n = 100 is used. +//Examples +//a = [1 2 3 4 5]; +//b = [7; 8; 9; 10; 11]; +//v = 10; +//t = 5; +//n = 100; +//arma_rnd (a, b, v, t, n) +//ans = +// +// -1.6176e+05 +// -4.1663e+05 +// -1.0732e+06 +// -2.7648e+06 +// -7.1221e+06 + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 5 | rhs > 6) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 5 then + res = callOctave("arma_rnd",a, b, v, t) + + case 6 then + res = callOctave("arma_rnd",a, b, v, t, n) + + end +endfunction diff --git a/macros/armcov.bin b/macros/armcov.bin Binary files differdeleted file mode 100644 index 6465aab..0000000 --- a/macros/armcov.bin +++ /dev/null diff --git a/macros/aryule.bin b/macros/aryule.bin Binary files differdeleted file mode 100644 index 336ebf3..0000000 --- a/macros/aryule.bin +++ /dev/null diff --git a/macros/barthannwin.bin b/macros/barthannwin.bin Binary files differdeleted file mode 100644 index 1b9ed25..0000000 --- a/macros/barthannwin.bin +++ /dev/null diff --git a/macros/bartlett.bin b/macros/bartlett.bin Binary files differdeleted file mode 100644 index 373d8c0..0000000 --- a/macros/bartlett.bin +++ /dev/null diff --git a/macros/besselap.bin b/macros/besselap.bin Binary files differdeleted file mode 100644 index 9794042..0000000 --- a/macros/besselap.bin +++ /dev/null diff --git a/macros/besself.bin b/macros/besself.bin Binary files differdeleted file mode 100644 index 69dbfd2..0000000 --- a/macros/besself.bin +++ /dev/null diff --git a/macros/bitrevorder.bin b/macros/bitrevorder.bin Binary files differdeleted file mode 100644 index f167fa0..0000000 --- a/macros/bitrevorder.bin +++ /dev/null diff --git a/macros/blackman.bin b/macros/blackman.bin Binary files differdeleted file mode 100644 index 020909f..0000000 --- a/macros/blackman.bin +++ /dev/null diff --git a/macros/blackmanharris.bin b/macros/blackmanharris.bin Binary files differdeleted file mode 100644 index c9760f6..0000000 --- a/macros/blackmanharris.bin +++ /dev/null diff --git a/macros/blackmannuttall.bin b/macros/blackmannuttall.bin Binary files differdeleted file mode 100644 index f242bc0..0000000 --- a/macros/blackmannuttall.bin +++ /dev/null diff --git a/macros/bohmanwin.bin b/macros/bohmanwin.bin Binary files differdeleted file mode 100644 index 53ea3a9..0000000 --- a/macros/bohmanwin.bin +++ /dev/null diff --git a/macros/boxcar.bin b/macros/boxcar.bin Binary files differdeleted file mode 100644 index 9f129da..0000000 --- a/macros/boxcar.bin +++ /dev/null diff --git a/macros/buffer.bin b/macros/buffer.bin Binary files differdeleted file mode 100644 index 7cb0a77..0000000 --- a/macros/buffer.bin +++ /dev/null diff --git a/macros/buttap.bin b/macros/buttap.bin Binary files differdeleted file mode 100644 index 10ce21e..0000000 --- a/macros/buttap.bin +++ /dev/null diff --git a/macros/butter.bin b/macros/butter.bin Binary files differdeleted file mode 100644 index 1ed2eaf..0000000 --- a/macros/butter.bin +++ /dev/null diff --git a/macros/buttord.bin b/macros/buttord.bin Binary files differdeleted file mode 100644 index a6cdc9c..0000000 --- a/macros/buttord.bin +++ /dev/null diff --git a/macros/cceps.bin b/macros/cceps.bin Binary files differdeleted file mode 100644 index cda9e36..0000000 --- a/macros/cceps.bin +++ /dev/null diff --git a/macros/cconv.bin b/macros/cconv.bin Binary files differdeleted file mode 100644 index 977d0b2..0000000 --- a/macros/cconv.bin +++ /dev/null diff --git a/macros/cell2sos.bin b/macros/cell2sos.bin Binary files differdeleted file mode 100644 index becc9e0..0000000 --- a/macros/cell2sos.bin +++ /dev/null diff --git a/macros/cheb.bin b/macros/cheb.bin Binary files differdeleted file mode 100644 index 28632eb..0000000 --- a/macros/cheb.bin +++ /dev/null diff --git a/macros/cheb1ap.bin b/macros/cheb1ap.bin Binary files differdeleted file mode 100644 index 7414b4a..0000000 --- a/macros/cheb1ap.bin +++ /dev/null diff --git a/macros/cheb1ord.bin b/macros/cheb1ord.bin Binary files differdeleted file mode 100644 index 7cf442d..0000000 --- a/macros/cheb1ord.bin +++ /dev/null diff --git a/macros/cheb2ap.bin b/macros/cheb2ap.bin Binary files differdeleted file mode 100644 index 558a95b..0000000 --- a/macros/cheb2ap.bin +++ /dev/null diff --git a/macros/cheb2ord.bin b/macros/cheb2ord.bin Binary files differdeleted file mode 100644 index b1602ec..0000000 --- a/macros/cheb2ord.bin +++ /dev/null diff --git a/macros/chebwin.bin b/macros/chebwin.bin Binary files differdeleted file mode 100644 index cd27563..0000000 --- a/macros/chebwin.bin +++ /dev/null diff --git a/macros/cheby1.bin b/macros/cheby1.bin Binary files differdeleted file mode 100644 index 5fff1f3..0000000 --- a/macros/cheby1.bin +++ /dev/null diff --git a/macros/cheby2.bin b/macros/cheby2.bin Binary files differdeleted file mode 100644 index f68fe52..0000000 --- a/macros/cheby2.bin +++ /dev/null diff --git a/macros/check.bin b/macros/check.bin Binary files differdeleted file mode 100644 index 678d4a0..0000000 --- a/macros/check.bin +++ /dev/null diff --git a/macros/chirp.bin b/macros/chirp.bin Binary files differdeleted file mode 100644 index 4251c53..0000000 --- a/macros/chirp.bin +++ /dev/null diff --git a/macros/cl2bp.sci b/macros/cl2bp.sci new file mode 100644 index 0000000..1069cf0 --- /dev/null +++ b/macros/cl2bp.sci @@ -0,0 +1,47 @@ +function h = cl2bp (m, w1, w2, up, lo, gridsize) +//Constrained L2 bandpass FIR filter design. +//Calling Sequence +//h = cl2bp (m, w1, w2, up, lo, gridsize) +//h = cl2bp (m, w1, w2, up, lo) +//Parameters +//m: degree of cosine polynomial, i.e. the number of output coefficients will be m*2+1 +//w1 and w2: bandpass filter cutoffs in the range 0 <= w1 < w2 <= pi, where pi is the Nyquist frequency +//up: vector of 3 upper bounds for [stopband1, passband, stopband2] +//lo: vector of 3 lower bounds for [stopband1, passband, stopband2] +//gridsize: search grid size; larger values may improve accuracy, but greatly increase calculation time. +//Description +//This is an Octave function. +//Constrained L2 bandpass FIR filter design. Compared to remez, it offers implicit specification of transition bands, a higher likelihood of convergence, and an error criterion combining features of both L2 and Chebyshev approaches. +//Examples +//h = cl2bp(5, 0.3*pi, 0.6*pi, [0.02, 1.02, 0.02], [-0.02, 0.98, -0.02], 2^11) +//h = +// +// 0.038311 +// 0.082289 +// -0.086163 +// -0.226006 +// 0.047851 +// 0.307434 +// 0.047851 +// -0.226006 +// -0.086163 +// 0.082289 +// 0.038311 + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 5 | rhs > 6) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 5 then + res = callOctave("cl2bp", m, w1, w2, up, lo) + + case 6 then + res = callOctave("cl2bp", m, w1, w2, up, lo, gridsize) + + end +endfunction diff --git a/macros/clustersegment.bin b/macros/clustersegment.bin Binary files differdeleted file mode 100644 index fc1d371..0000000 --- a/macros/clustersegment.bin +++ /dev/null diff --git a/macros/cmorwavf.bin b/macros/cmorwavf.bin Binary files differdeleted file mode 100644 index ecaa435..0000000 --- a/macros/cmorwavf.bin +++ /dev/null diff --git a/macros/convmtx.bin b/macros/convmtx.bin Binary files differdeleted file mode 100644 index 1925e20..0000000 --- a/macros/convmtx.bin +++ /dev/null diff --git a/macros/corrmtx.bin b/macros/corrmtx.bin Binary files differdeleted file mode 100644 index 1a11222..0000000 --- a/macros/corrmtx.bin +++ /dev/null diff --git a/macros/cplxreal.bin b/macros/cplxreal.bin Binary files differdeleted file mode 100644 index c5c522b..0000000 --- a/macros/cplxreal.bin +++ /dev/null diff --git a/macros/cplxreal.sci b/macros/cplxreal.sci index 8443837..a552998 100644 --- a/macros/cplxreal.sci +++ b/macros/cplxreal.sci @@ -14,6 +14,11 @@ function [zc, zr] = cplxreal (z, thresh) //This is an Octave function. //Every complex element of z is expected to have a complex-conjugate elsewhere in z. From the pair of complex-conjugates, the one with the negative imaginary part is removed. //If the magnitude of the imaginary part of an element is less than the thresh, it is declared as real. +//Examples +//[zc, zr] = cplxreal([1 2 3+i 4 3-i 5]) +//zc = 3 + 1i +//zr = +// 1 2 4 5 funcprot(0); lhs = argn(1) rhs = argn(2) diff --git a/macros/cummax.bin b/macros/cummax.bin Binary files differdeleted file mode 100644 index 0dc047b..0000000 --- a/macros/cummax.bin +++ /dev/null diff --git a/macros/cummin.bin b/macros/cummin.bin Binary files differdeleted file mode 100644 index 860597d..0000000 --- a/macros/cummin.bin +++ /dev/null diff --git a/macros/czt.bin b/macros/czt.bin Binary files differdeleted file mode 100644 index a9cd8c5..0000000 --- a/macros/czt.bin +++ /dev/null diff --git a/macros/db.bin b/macros/db.bin Binary files differdeleted file mode 100644 index e46766c..0000000 --- a/macros/db.bin +++ /dev/null diff --git a/macros/db2pow.bin b/macros/db2pow.bin Binary files differdeleted file mode 100644 index d369ded..0000000 --- a/macros/db2pow.bin +++ /dev/null diff --git a/macros/dctmtx.bin b/macros/dctmtx.bin Binary files differdeleted file mode 100644 index 68472e5..0000000 --- a/macros/dctmtx.bin +++ /dev/null diff --git a/macros/decimate.bin b/macros/decimate.bin Binary files differdeleted file mode 100644 index ea34ac2..0000000 --- a/macros/decimate.bin +++ /dev/null diff --git a/macros/dftmtx.bin b/macros/dftmtx.bin Binary files differdeleted file mode 100644 index df1c875..0000000 --- a/macros/dftmtx.bin +++ /dev/null diff --git a/macros/diric.bin b/macros/diric.bin Binary files differdeleted file mode 100644 index 47eaa34..0000000 --- a/macros/diric.bin +++ /dev/null diff --git a/macros/downsample.bin b/macros/downsample.bin Binary files differdeleted file mode 100644 index 149a5cb..0000000 --- a/macros/downsample.bin +++ /dev/null diff --git a/macros/dst1.bin b/macros/dst1.bin Binary files differdeleted file mode 100644 index 91b23ca..0000000 --- a/macros/dst1.bin +++ /dev/null diff --git a/macros/dutycycle.bin b/macros/dutycycle.bin Binary files differdeleted file mode 100644 index 710c058..0000000 --- a/macros/dutycycle.bin +++ /dev/null diff --git a/macros/ellip.bin b/macros/ellip.bin Binary files differdeleted file mode 100644 index 2fda3a0..0000000 --- a/macros/ellip.bin +++ /dev/null diff --git a/macros/ellipap.bin b/macros/ellipap.bin Binary files differdeleted file mode 100644 index da6ce2e..0000000 --- a/macros/ellipap.bin +++ /dev/null diff --git a/macros/ellipord.bin b/macros/ellipord.bin Binary files differdeleted file mode 100644 index 60fca21..0000000 --- a/macros/ellipord.bin +++ /dev/null diff --git a/macros/enbw.bin b/macros/enbw.bin Binary files differdeleted file mode 100644 index 6dabe0e..0000000 --- a/macros/enbw.bin +++ /dev/null diff --git a/macros/eqtflength.bin b/macros/eqtflength.bin Binary files differdeleted file mode 100644 index 4aa5c4b..0000000 --- a/macros/eqtflength.bin +++ /dev/null diff --git a/macros/falltime.bin b/macros/falltime.bin Binary files differdeleted file mode 100644 index 318d449..0000000 --- a/macros/falltime.bin +++ /dev/null diff --git a/macros/fft.bin b/macros/fft.bin Binary files differdeleted file mode 100644 index 088707e..0000000 --- a/macros/fft.bin +++ /dev/null diff --git a/macros/fft.sci b/macros/fft1.sci index 0ea54ab..a0a6438 100644 --- a/macros/fft.sci +++ b/macros/fft1.sci @@ -1,4 +1,4 @@ -function res = fft (x, n, dim) +function res = fft1 (x, n, dim) //Calculates the discrete Fourier transform of a matrix using Fast Fourier Transform algorithm. //Calling Sequence //fft (x, n, dim) @@ -20,7 +20,7 @@ function res = fft (x, n, dim) //x = [1 2 3; 4 5 6; 7 8 9] //n = 3 //dim = 2 -//fft (x, n, dim) +//fft1 (x, n, dim) //ans = // // 6.0000 + 0.0000i -1.5000 + 0.8660i -1.5000 - 0.8660i diff --git a/macros/fft2.bin b/macros/fft2.bin Binary files differdeleted file mode 100644 index dd6e2cc..0000000 --- a/macros/fft2.bin +++ /dev/null diff --git a/macros/fft2.sci b/macros/fft21.sci index 58cd70d..2f04200 100644 --- a/macros/fft2.sci +++ b/macros/fft21.sci @@ -1,4 +1,4 @@ -function res = fft2 (A, m, n) +function res = fft21 (A, m, n) //Calculates the two-dimensional discrete Fourier transform of A using a Fast Fourier Transform algorithm. //Calling Sequence //fft2 (A, m, n) @@ -15,7 +15,7 @@ function res = fft2 (A, m, n) //x = [1 2 3; 4 5 6; 7 8 9] //m = 4 //n = 4 -//fft2 (A, m, n) +//fft21 (A, m, n) //ans = // // 45 + 0i -6 - 15i 15 + 0i -6 + 15i diff --git a/macros/fftfilt.bin b/macros/fftfilt.bin Binary files differdeleted file mode 100644 index 4ddcc74..0000000 --- a/macros/fftfilt.bin +++ /dev/null diff --git a/macros/fftw1.sci b/macros/fftw1.sci new file mode 100644 index 0000000..a530017 --- /dev/null +++ b/macros/fftw1.sci @@ -0,0 +1,64 @@ +function res = fftw1(a, b) +//Manage FFTW wisdom data. +//Calling Sequence +// method = fftw ("planner") +//fftw ("planner", method) +//wisdom = fftw ("dwisdom") +//fftw ("dwisdom", wisdom) +//fftw ("threads", nthreads) +//nthreads = fftw ("threads") +//Parameters +//Description +//This is an Octave function. +//Wisdom data can be used to significantly accelerate the calculation of the FFTs, but implies an initial cost in its calculation. When the FFTW libraries are initialized, they read a system wide wisdom +//file (typically in /etc/fftw/wisdom), allowing wisdom to be shared between applications other than Octave. Alternatively, the fftw function can be used to import wisdom. For example, +// +//wisdom = fftw ("dwisdom") +//will save the existing wisdom used by Octave to the string wisdom. This string can then be saved to a file and restored using the save and load commands respectively. This existing wisdom can be re +//imported as follows +// +//fftw ("dwisdom", wisdom) +//If wisdom is an empty string, then the wisdom used is cleared. +// +//During the calculation of Fourier transforms further wisdom is generated. The fashion in which this wisdom is generated is also controlled by the fftw function. There are five different manners in which +//the wisdom can be treated: +// +//"estimate" +//Specifies that no run-time measurement of the optimal means of calculating a particular is performed, and a simple heuristic is used to pick a (probably sub-optimal) plan. The advantage of this method +//is that there is little or no overhead in the generation of the plan, which is appropriate for a Fourier transform that will be calculated once. +// +//"measure" +//In this case a range of algorithms to perform the transform is considered and the best is selected based on their execution time. +// +//"patient" +//Similar to "measure", but a wider range of algorithms is considered. +// +//"exhaustive" +//Like "measure", but all possible algorithms that may be used to treat the transform are considered. +// +//"hybrid" +//As run-time measurement of the algorithm can be expensive, this is a compromise where "measure" is used for transforms up to the size of 8192 and beyond that the "estimate" method is used. +// +//The default method is "estimate". The current method can be queried with +// +//method = fftw ("planner") +//or set by using +// +//fftw ("planner", method) + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 1 | rhs > 2) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 1 then + res = callOctave("fftw",a) + + case 2 then + res = callOctave("fftw",a, b) + end +endfunction diff --git a/macros/fht.bin b/macros/fht.bin Binary files differdeleted file mode 100644 index e97d7e4..0000000 --- a/macros/fht.bin +++ /dev/null diff --git a/macros/filternorm.bin b/macros/filternorm.bin Binary files differdeleted file mode 100644 index 8e15a18..0000000 --- a/macros/filternorm.bin +++ /dev/null diff --git a/macros/filtfilt.bin b/macros/filtfilt.bin Binary files differdeleted file mode 100644 index ada5742..0000000 --- a/macros/filtfilt.bin +++ /dev/null diff --git a/macros/filtic.bin b/macros/filtic.bin Binary files differdeleted file mode 100644 index cd79ea4..0000000 --- a/macros/filtic.bin +++ /dev/null diff --git a/macros/filtord.bin b/macros/filtord.bin Binary files differdeleted file mode 100644 index dd4f7ed..0000000 --- a/macros/filtord.bin +++ /dev/null diff --git a/macros/firpmord.bin b/macros/firpmord.bin Binary files differdeleted file mode 100644 index 8f8dddd..0000000 --- a/macros/firpmord.bin +++ /dev/null diff --git a/macros/firtype.bin b/macros/firtype.bin Binary files differdeleted file mode 100644 index 411b2de..0000000 --- a/macros/firtype.bin +++ /dev/null diff --git a/macros/flattopwin.bin b/macros/flattopwin.bin Binary files differdeleted file mode 100644 index f9795b4..0000000 --- a/macros/flattopwin.bin +++ /dev/null diff --git a/macros/fracshift.bin b/macros/fracshift.bin Binary files differdeleted file mode 100644 index 989ab10..0000000 --- a/macros/fracshift.bin +++ /dev/null diff --git a/macros/freqs.bin b/macros/freqs.bin Binary files differdeleted file mode 100644 index 066c156..0000000 --- a/macros/freqs.bin +++ /dev/null diff --git a/macros/fwhm.bin b/macros/fwhm.bin Binary files differdeleted file mode 100644 index 38e0180..0000000 --- a/macros/fwhm.bin +++ /dev/null diff --git a/macros/fwhmjlt.bin b/macros/fwhmjlt.bin Binary files differdeleted file mode 100644 index 98edf6c..0000000 --- a/macros/fwhmjlt.bin +++ /dev/null diff --git a/macros/fwht.bin b/macros/fwht.bin Binary files differdeleted file mode 100644 index e2b1d80..0000000 --- a/macros/fwht.bin +++ /dev/null diff --git a/macros/gauspuls.bin b/macros/gauspuls.bin Binary files differdeleted file mode 100644 index 7ed8b82..0000000 --- a/macros/gauspuls.bin +++ /dev/null diff --git a/macros/gaussdesign.bin b/macros/gaussdesign.bin Binary files differdeleted file mode 100644 index 8b05521..0000000 --- a/macros/gaussdesign.bin +++ /dev/null diff --git a/macros/gaussian.bin b/macros/gaussian.bin Binary files differdeleted file mode 100644 index 472d182..0000000 --- a/macros/gaussian.bin +++ /dev/null diff --git a/macros/gausswin.bin b/macros/gausswin.bin Binary files differdeleted file mode 100644 index 8133cd0..0000000 --- a/macros/gausswin.bin +++ /dev/null diff --git a/macros/gmonopuls.bin b/macros/gmonopuls.bin Binary files differdeleted file mode 100644 index bc0bcfb..0000000 --- a/macros/gmonopuls.bin +++ /dev/null diff --git a/macros/goertzel.bin b/macros/goertzel.bin Binary files differdeleted file mode 100644 index b1af7e2..0000000 --- a/macros/goertzel.bin +++ /dev/null diff --git a/macros/grpdelay.bin b/macros/grpdelay.bin Binary files differdeleted file mode 100644 index be071e0..0000000 --- a/macros/grpdelay.bin +++ /dev/null diff --git a/macros/hann.bin b/macros/hann.bin Binary files differdeleted file mode 100644 index 6d9679a..0000000 --- a/macros/hann.bin +++ /dev/null diff --git a/macros/helperHarmonicDistortionAmplifier.bin b/macros/helperHarmonicDistortionAmplifier.bin Binary files differdeleted file mode 100644 index e577060..0000000 --- a/macros/helperHarmonicDistortionAmplifier.bin +++ /dev/null diff --git a/macros/hilbert1.bin b/macros/hilbert1.bin Binary files differdeleted file mode 100644 index 11ff749..0000000 --- a/macros/hilbert1.bin +++ /dev/null diff --git a/macros/hurst.bin b/macros/hurst.bin Binary files differdeleted file mode 100644 index f723804..0000000 --- a/macros/hurst.bin +++ /dev/null diff --git a/macros/icceps.bin b/macros/icceps.bin Binary files differdeleted file mode 100644 index 937de63..0000000 --- a/macros/icceps.bin +++ /dev/null diff --git a/macros/idct1.bin b/macros/idct1.bin Binary files differdeleted file mode 100644 index 3ef1c7e..0000000 --- a/macros/idct1.bin +++ /dev/null diff --git a/macros/idct2.bin b/macros/idct2.bin Binary files differdeleted file mode 100644 index d577764..0000000 --- a/macros/idct2.bin +++ /dev/null diff --git a/macros/idst1.bin b/macros/idst1.bin Binary files differdeleted file mode 100644 index 448ee7e..0000000 --- a/macros/idst1.bin +++ /dev/null diff --git a/macros/ifft.bin b/macros/ifft.bin Binary files differdeleted file mode 100644 index 1c95870..0000000 --- a/macros/ifft.bin +++ /dev/null diff --git a/macros/ifft.sci b/macros/ifft1.sci index 70688e4..3e94934 100644 --- a/macros/ifft.sci +++ b/macros/ifft1.sci @@ -1,4 +1,4 @@ -function res = ifft (x, n, dim) +function res = ifft1 (x, n, dim) //Calculates the inverse discrete Fourier transform of a matrix using Fast Fourier Transform algorithm. //Calling Sequence //ifft (x, n, dim) @@ -22,7 +22,7 @@ function res = ifft (x, n, dim) //x = [1 2 3; 4 5 6; 7 8 9] //n = 3 //dim = 2 -//ifft (x, n, dim) +//ifft1 (x, n, dim) //ans = // // 2.00000 + 0.00000i -0.50000 - 0.28868i -0.50000 + 0.28868i diff --git a/macros/ifft2.bin b/macros/ifft2.bin Binary files differdeleted file mode 100644 index bcd3a09..0000000 --- a/macros/ifft2.bin +++ /dev/null diff --git a/macros/ifft2.sci b/macros/ifft21.sci index 8ecb1a5..25ed82f 100644 --- a/macros/ifft2.sci +++ b/macros/ifft21.sci @@ -1,4 +1,4 @@ -function res = ifft2 (A, m, n) +function res = ifft21 (A, m, n) //Calculates the inverse two-dimensional discrete Fourier transform of A using a Fast Fourier Transform algorithm. //Calling Sequence //ifft2 (A, m, n) @@ -15,7 +15,7 @@ function res = ifft2 (A, m, n) //x = [1 2 3; 4 5 6; 7 8 9] //m = 4 //n = 4 -//ifft2 (A, m, n) +//ifft21 (A, m, n) //ans = // // 2.81250 + 0.00000i -0.37500 + 0.93750i 0.93750 + 0.00000i -0.37500 - 0.93750i diff --git a/macros/ifht.bin b/macros/ifht.bin Binary files differdeleted file mode 100644 index 7cab709..0000000 --- a/macros/ifht.bin +++ /dev/null diff --git a/macros/ifwht.bin b/macros/ifwht.bin Binary files differdeleted file mode 100644 index 2acef55..0000000 --- a/macros/ifwht.bin +++ /dev/null diff --git a/macros/iirlp2mb.bin b/macros/iirlp2mb.bin Binary files differdeleted file mode 100644 index 4459654..0000000 --- a/macros/iirlp2mb.bin +++ /dev/null diff --git a/macros/impinvar.bin b/macros/impinvar.bin Binary files differdeleted file mode 100644 index bc5bea1..0000000 --- a/macros/impinvar.bin +++ /dev/null diff --git a/macros/impz.bin b/macros/impz.bin Binary files differdeleted file mode 100644 index eb1ef54..0000000 --- a/macros/impz.bin +++ /dev/null diff --git a/macros/impzlength.bin b/macros/impzlength.bin Binary files differdeleted file mode 100644 index 147b140..0000000 --- a/macros/impzlength.bin +++ /dev/null diff --git a/macros/interp.bin b/macros/interp.bin Binary files differdeleted file mode 100644 index 36fbbe1..0000000 --- a/macros/interp.bin +++ /dev/null diff --git a/macros/intfilt.bin b/macros/intfilt.bin Binary files differdeleted file mode 100644 index 3a02288..0000000 --- a/macros/intfilt.bin +++ /dev/null diff --git a/macros/invfreq.bin b/macros/invfreq.bin Binary files differdeleted file mode 100644 index a13ae55..0000000 --- a/macros/invfreq.bin +++ /dev/null diff --git a/macros/invfreqs.sci b/macros/invfreqs.sci new file mode 100644 index 0000000..32e732b --- /dev/null +++ b/macros/invfreqs.sci @@ -0,0 +1,96 @@ +function [B,A,C] = invfreqs(H,F,nB,nA,W,iter,tol,trace) +//Fit filter B(s)/A(s)to the complex frequency response H at frequency points F. A and B are real polynomial coefficients of order nA and nB. +//Calling Sequence +//[B,A,C] = invfreqs(H,F,nB,nA,W,iter,tol,trace) +//[B,A,C] = invfreqs(H,F,nB,nA,W) +//[B,A,C] = invfreqs(H,F,nB,nA) +//Parameters +//H: desired complex frequency response. +//F: frequency (must be same length as H). +//nB: order of the numerator polynomial B. +//nA: order of the denominator polynomial A. +//W: vector of weights (must be same length as F). +//Description +//This is an Octave function. +//Fit filter B(s)/A(s)to the complex frequency response H at frequency points F. A and B are real polynomial coefficients of order nA and nB. +//Optionally, the fit-errors can be weighted vs frequency according to the weights W. +//Note: all the guts are in invfreq.m +//Examples +//B = [1/2 1]; +//A = [1 1]; +//w = linspace(0,4,128); +//H = freqs(B,A,w); +//[Bh,Ah, C] = invfreqs(H,w,1,1); +//Bh = +// +// 0.50000 1.00000 +// +//Ah = +// +// 1.0000 1.0000 +// +//C = -3.0964e-15 + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 4 | rhs > 8) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 4 then + if(lhs==1) + B = callOctave("invfreqs",H,F,nB,nA) + elseif(lhs==2) + [B, A] = callOctave("invfreqs",H,F,nB,nA) + elseif(lhs==3) + [B, A, C] = callOctave("invfreqs",H,F,nB,nA) + else + error("Wrong number of output argments.") + end + + case 5 then + if(lhs==1) + B = callOctave("invfreqs",H,F,nB,nA,W) + elseif(lhs==2) + [B, A] = callOctave("invfreqs",H,F,nB,nA,W) + elseif(lhs==3) + [B, A, C] = callOctave("invfreqs",H,F,nB,nA,W) + else + error("Wrong number of output argments.") + end + case 6 then + if(lhs==1) + B = callOctave("invfreqs",H,F,nB,nA,W,iter) + elseif(lhs==2) + [B, A] = callOctave("invfreqs",H,F,nB,nA,W,iter) + elseif(lhs==3) + [B, A, C] = callOctave("invfreqs",H,F,nB,nA,W,iter) + else + error("Wrong number of output argments.") + end + case 7 then + if(lhs==1) + B = callOctave("invfreqs",H,F,nB,nA,W,iter,tol) + elseif(lhs==2) + [B, A] = callOctave("invfreqs",H,F,nB,nA,W,iter,tol) + elseif(lhs==3) + [B, A, C] = callOctave("invfreqs",H,F,nB,nA,W,iter,tol) + else + error("Wrong number of output argments.") + end + case 8 then + if(lhs==1) + B = callOctave("invfreqs",H,F,nB,nA,W,iter,tol,trace) + elseif(lhs==2) + [B, A] = callOctave("invfreqs",H,F,nB,nA,W,iter,tol,trace) + elseif(lhs==3) + [B, A, C] = callOctave("invfreqs",H,F,nB,nA,W,iter,tol,trace) + else + error("Wrong number of output argments.") + end + end +endfunction + diff --git a/macros/invfreqz.sci b/macros/invfreqz.sci new file mode 100644 index 0000000..d051499 --- /dev/null +++ b/macros/invfreqz.sci @@ -0,0 +1,94 @@ +function [B,A,C] = invfreqz(H,F,nB,nA,W,iter,tol,trace) +//Fit filter B(z)/A(z)to the complex frequency response H at frequency points F. A and B are real polynomial coefficients of order nA and nB. +//Calling Sequence +//[B,A,C] = invfreqz(H,F,nB,nA,W,iter,tol,trace) +//[B,A,C] = invfreqz(H,F,nB,nA,W) +//[B,A,C] = invfreqz(H,F,nB,nA) +//Parameters +//H: desired complex frequency response. +//F: frequency (must be same length as H). +//nB: order of the numerator polynomial B. +//nA: order of the denominator polynomial A. +//W: vector of weights (must be same length as F). +//Description +//This is an Octave function. +//Fit filter B(z)/A(z)to the complex frequency response H at frequency points F. A and B are real polynomial coefficients of order nA and nB. +//Optionally, the fit-errors can be weighted vs frequency according to the weights W. +//Note: all the guts are in invfreq.m +//Examples +//[B,A] = butter(4,1/4); +//[H,F] = freqz(B,A); +//[Bh,Ah,C] = invfreq(H,F,4,4) +//Bh = +// +// 0.010209 0.040838 0.061257 0.040838 0.010209 +// +//Ah = +// +// 1.00000 -1.96843 1.73586 -0.72447 0.12039 +// +//C = -7.7065e-15 + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 4 | rhs > 8) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 4 then + if(lhs==1) + B = callOctave("invfreqz",H,F,nB,nA) + elseif(lhs==2) + [B, A] = callOctave("invfreqz",H,F,nB,nA) + elseif(lhs==3) + [B, A, C] = callOctave("invfreqz",H,F,nB,nA) + else + error("Wrong number of output argments.") + end + + case 5 then + if(lhs==1) + B = callOctave("invfreqz",H,F,nB,nA,W) + elseif(lhs==2) + [B, A] = callOctave("invfreqz",H,F,nB,nA,W) + elseif(lhs==3) + [B, A, C] = callOctave("invfreqz",H,F,nB,nA,W) + else + error("Wrong number of output argments.") + end + case 6 then + if(lhs==1) + B = callOctave("invfreqz",H,F,nB,nA,W,iter) + elseif(lhs==2) + [B, A] = callOctave("invfreqz",H,F,nB,nA,W,iter) + elseif(lhs==3) + [B, A, C] = callOctave("invfreqz",H,F,nB,nA,W,iter) + else + error("Wrong number of output argments.") + end + case 7 then + if(lhs==1) + B = callOctave("invfreqz",H,F,nB,nA,W,iter,tol) + elseif(lhs==2) + [B, A] = callOctave("invfreqz",H,F,nB,nA,W,iter,tol) + elseif(lhs==3) + [B, A, C] = callOctave("invfreqz",H,F,nB,nA,W,iter,tol) + else + error("Wrong number of output argments.") + end + case 8 then + if(lhs==1) + B = callOctave("invfreqz",H,F,nB,nA,W,iter,tol,trace) + elseif(lhs==2) + [B, A] = callOctave("invfreqz",H,F,nB,nA,W,iter,tol,trace) + elseif(lhs==3) + [B, A, C] = callOctave("invfreqz",H,F,nB,nA,W,iter,tol,trace) + else + error("Wrong number of output argments.") + end + end +endfunction + diff --git a/macros/invimpinvar.bin b/macros/invimpinvar.bin Binary files differdeleted file mode 100644 index a5f115f..0000000 --- a/macros/invimpinvar.bin +++ /dev/null diff --git a/macros/is2rc.bin b/macros/is2rc.bin Binary files differdeleted file mode 100644 index 325d4b5..0000000 --- a/macros/is2rc.bin +++ /dev/null diff --git a/macros/isallpass.bin b/macros/isallpass.bin Binary files differdeleted file mode 100644 index 6f27769..0000000 --- a/macros/isallpass.bin +++ /dev/null diff --git a/macros/isfir.bin b/macros/isfir.bin Binary files differdeleted file mode 100644 index c9670a9..0000000 --- a/macros/isfir.bin +++ /dev/null diff --git a/macros/islinphase.bin b/macros/islinphase.bin Binary files differdeleted file mode 100644 index 2f00f5e..0000000 --- a/macros/islinphase.bin +++ /dev/null diff --git a/macros/ismaxphase.bin b/macros/ismaxphase.bin Binary files differdeleted file mode 100644 index 3684e9a..0000000 --- a/macros/ismaxphase.bin +++ /dev/null diff --git a/macros/isminphase.bin b/macros/isminphase.bin Binary files differdeleted file mode 100644 index fc1991d..0000000 --- a/macros/isminphase.bin +++ /dev/null diff --git a/macros/isstable.bin b/macros/isstable.bin Binary files differdeleted file mode 100644 index 304c4be..0000000 --- a/macros/isstable.bin +++ /dev/null diff --git a/macros/kaiser.bin b/macros/kaiser.bin Binary files differdeleted file mode 100644 index 4e00979..0000000 --- a/macros/kaiser.bin +++ /dev/null diff --git a/macros/kaiserord.sci b/macros/kaiserord.sci new file mode 100644 index 0000000..47f4105 --- /dev/null +++ b/macros/kaiserord.sci @@ -0,0 +1,70 @@ +function [n, Wn, beta, ftype] = kaiserord (f, m, dev, fs) +//Return the parameters needed to produce a filter of the desired specification from a Kaiser window. +//Calling Sequence +//[n, Wn, beta, ftype] = kaiserord (f, m, dev, fs) +//[…] = kaiserord (f, m, dev, fs) +//[…] = kaiserord (f, m, dev) +//Parameters +//f: Pairs of frequency band edges. +//m: Magnitude response for each band. +//dev: Deviation of the filter. +//fs: Sampling rate. +//Description +//This is an Octave function. +//The vector f contains pairs of frequency band edges in the range [0,1]. The vector m specifies the magnitude response for each band. The values of m must be zero for all stop bands and must have the +//same magnitude for all pass bands. The deviation of the filter dev can be specified as a scalar or a vector of the same length as m. The optional sampling rate fs can be used to indicate that f is in +//Hz in the range [0,fs/2]. +// +//The returned value n is the required order of the filter (the length of the filter minus 1). The vector Wn contains the band edges of the filter suitable for passing to fir1. The value beta is the +//parameter of the Kaiser window of length n+1 to shape the filter. The string ftype contains the type of filter to specify to fir1. +// +//The Kaiser window parameters n and beta are computed from the relation between ripple (A=-20*log10(dev)) and transition width (dw in radians) discovered empirically by Kaiser: +// +// +// / 0.1102(A-8.7) A > 50 +// beta = | 0.5842(A-21)^0.4 + 0.07886(A-21) 21 <= A <= 50 +// \ 0.0 A < 21 +// +// n = (A-8)/(2.285 dw) +//Examples +//[n, w, beta, ftype] = kaiserord ([1000, 1200], [1, 0], [0.05, 0.05], 11025) +//n = 1 +//w = 1100 +//beta = 1.5099 +//ftype = low + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 3 | rhs > 4) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 3 then + if(lhs==1) + n = callOctave("kaiserord",f, m, dev) + elseif(lhs==2) + [n, Wn] = callOctave("kaiserord",f, m, dev) + elseif(lhs==3) + [n, Wn, beta] = callOctave("kaiserord",f, m, dev) + elseif(lhs==4) + [n, Wn, beta, ftype] = callOctave("kaiserord",f, m, dev) + else + error("Wrong number of output argments.") + end + case 4 then + if(lhs==1) + n = callOctave("kaiserord",f, m, dev, fs) + elseif(lhs==2) + [n, Wn] = callOctave("kaiserord",f, m, dev, fs) + elseif(lhs==3) + [n, Wn, beta] = callOctave("kaiserord",f, m, dev, fs) + elseif(lhs==4) + [n, Wn, beta, ftype] = callOctave("kaiserord",f, m, dev, fs) + else + error("Wrong number of output argments.") + end + end +endfunction diff --git a/macros/lar2rc.bin b/macros/lar2rc.bin Binary files differdeleted file mode 100644 index 16ad37f..0000000 --- a/macros/lar2rc.bin +++ /dev/null diff --git a/macros/latc2tf.bin b/macros/latc2tf.bin Binary files differdeleted file mode 100644 index 96fbc64..0000000 --- a/macros/latc2tf.bin +++ /dev/null diff --git a/macros/latcfilt.bin b/macros/latcfilt.bin Binary files differdeleted file mode 100644 index 3887ce0..0000000 --- a/macros/latcfilt.bin +++ /dev/null diff --git a/macros/latcfilt1.bin b/macros/latcfilt1.bin Binary files differdeleted file mode 100644 index 72f06d8..0000000 --- a/macros/latcfilt1.bin +++ /dev/null diff --git a/macros/levdown.bin b/macros/levdown.bin Binary files differdeleted file mode 100644 index 06045ae..0000000 --- a/macros/levdown.bin +++ /dev/null diff --git a/macros/levin.bin b/macros/levin.bin Binary files differdeleted file mode 100644 index 87a4029..0000000 --- a/macros/levin.bin +++ /dev/null diff --git a/macros/levinson.bin b/macros/levinson.bin Binary files differBinary files differdeleted file mode 100644 index 55ad79d..0000000 --- a/macros/levinson.bin +++ /dev/null diff --git a/macros/lpc.bin b/macros/lpc.bin Binary files differdeleted file mode 100644 index ccaf9d9..0000000 --- a/macros/lpc.bin +++ /dev/null diff --git a/macros/lsf2poly.bin b/macros/lsf2poly.bin Binary files differdeleted file mode 100644 index 4c20636..0000000 --- a/macros/lsf2poly.bin +++ /dev/null diff --git a/macros/mag2db.bin b/macros/mag2db.bin Binary files differdeleted file mode 100644 index 58186d6..0000000 --- a/macros/mag2db.bin +++ /dev/null diff --git a/macros/marcumq.bin b/macros/marcumq.bin Binary files differdeleted file mode 100644 index 187ddfa..0000000 --- a/macros/marcumq.bin +++ /dev/null diff --git a/macros/medfilt1.bin b/macros/medfilt1.bin Binary files differdeleted file mode 100644 index d5cc06f..0000000 --- a/macros/medfilt1.bin +++ /dev/null diff --git a/macros/mexihat.bin b/macros/mexihat.bin Binary files differdeleted file mode 100644 index 9e4879d..0000000 --- a/macros/mexihat.bin +++ /dev/null diff --git a/macros/meyeraux.bin b/macros/meyeraux.bin Binary files differdeleted file mode 100644 index 5d3239f..0000000 --- a/macros/meyeraux.bin +++ /dev/null diff --git a/macros/midcross.bin b/macros/midcross.bin Binary files differdeleted file mode 100644 index a5e182d..0000000 --- a/macros/midcross.bin +++ /dev/null diff --git a/macros/modulate.bin b/macros/modulate.bin Binary files differdeleted file mode 100644 index 169b209..0000000 --- a/macros/modulate.bin +++ /dev/null diff --git a/macros/morlet.bin b/macros/morlet.bin Binary files differdeleted file mode 100644 index f00e186..0000000 --- a/macros/morlet.bin +++ /dev/null diff --git a/macros/movingrms.bin b/macros/movingrms.bin Binary files differdeleted file mode 100644 index 720357d..0000000 --- a/macros/movingrms.bin +++ /dev/null diff --git a/macros/musicBase.bin b/macros/musicBase.bin Binary files differdeleted file mode 100644 index 884ae30..0000000 --- a/macros/musicBase.bin +++ /dev/null diff --git a/macros/names b/macros/names index b2ce8bd..b3d1310 100644 --- a/macros/names +++ b/macros/names @@ -2,7 +2,9 @@ ac2poly ac2rc arParEst arburg +arch_rnd arcov +arma_rnd armcov aryule barthannwin @@ -32,6 +34,7 @@ cheby1 cheby2 check chirp +cl2bp clustersegment cmorwavf convmtx @@ -55,9 +58,10 @@ ellipord enbw eqtflength falltime -fft -fft2 +fft1 +fft21 fftfilt +fftw1 fht filternorm filtfilt @@ -83,16 +87,13 @@ helperHarmonicDistortionAmplifier hilbert1 hurst icceps -<<<<<<< HEAD -ifft -ifft2 -======= idct1 idct2 idst1 +ifft1 +ifft21 ifht ifwht ->>>>>>> 9f6962b19c4a5fa76f7525a72faabb1b754712ad iirlp2mb impinvar impz @@ -100,6 +101,8 @@ impzlength interp intfilt invfreq +invfreqs +invfreqz invimpinvar is2rc isallpass @@ -109,6 +112,7 @@ ismaxphase isminphase isstable kaiser +kaiserord lar2rc latc2tf latcfilt @@ -132,6 +136,7 @@ ncauer nnls nuttallwin parzenwin +pburg pchip pchips peak2peak @@ -157,6 +162,8 @@ pulseperiod pulsesep pulsewidth pulstran +pyulear +qp_kaiser rc2ac rc2is rc2lar @@ -180,6 +187,7 @@ sawtooth schtrig schurrc seqperiod +sftrans sgolay sgolayfilt shanwavf @@ -208,6 +216,7 @@ synthesis tf2sos tf2zp tf2zpk +tfestimate transpose trial_iirlp2mb triang @@ -228,6 +237,7 @@ welchwin window wkeep wrev +xcorr1 xcorr2 xcov1 yulewalker diff --git a/macros/ncauer.bin b/macros/ncauer.bin Binary files differdeleted file mode 100644 index 0886fbd..0000000 --- a/macros/ncauer.bin +++ /dev/null diff --git a/macros/nnls.bin b/macros/nnls.bin Binary files differdeleted file mode 100644 index 616c06a..0000000 --- a/macros/nnls.bin +++ /dev/null diff --git a/macros/nuttallwin.bin b/macros/nuttallwin.bin Binary files differdeleted file mode 100644 index 92c09d6..0000000 --- a/macros/nuttallwin.bin +++ /dev/null diff --git a/macros/parzenwin.bin b/macros/parzenwin.bin Binary files differdeleted file mode 100644 index ce71bf1..0000000 --- a/macros/parzenwin.bin +++ /dev/null diff --git a/macros/pburg.sci b/macros/pburg.sci new file mode 100644 index 0000000..78198ed --- /dev/null +++ b/macros/pburg.sci @@ -0,0 +1,93 @@ +function [psd,f_out] = pburg(x,poles,freq,Fs,range,method,plot_type,criterion) +//Calculate Burg maximum-entropy power spectral density. +//Calling Sequence +//[psd,f_out] = pburg(x,poles,freq,Fs,range,method,plot_type,criterion) +//All but the first two arguments are optional and may be empty. +//Parameters +// x: [vector] sampled data +// poles: [integer scalar] required number of poles of the AR model +// freq: [real vector] frequencies at which power spectral density is calculated [integer scalar] number of uniformly distributed frequency values at which spectral density is calculated. [default=256] +// Fs: [real scalar] sampling frequency (Hertz) [default=1] +// range: 'half', 'onesided' : frequency range of the spectrum is from zero up to but not including sample_f/2. Power from negative frequencies is added to the positive side of the spectrum. 'whole', 'twosided' : frequency range of the spectrum is -sample_f/2 to sample_f/2, with negative frequencies stored in "wrap around" order after the positive frequencies; e.g. frequencies for a 10-point 'twosided' spectrum are 0 0.1 0.2 0.3 0.4 0.5 -0.4 -0.3 -0.2 -0.1 'shift', 'centerdc' : same as 'whole' but with the first half of the spectrum swapped with second half to put the zero-frequency value in the middle. (See "help fftshift". If "freq" is vector, 'shift' is ignored. If model coefficients "ar_coeffs" are real, the default range is 'half', otherwise default range is 'whole'. +// method: 'fft': use FFT to calculate power spectral density. 'poly': calculate spectral density as a polynomial of 1/z N.B. this argument is ignored if the "freq" argument is a vector. The default is 'poly' unless the "freq" argument is an integer power of 2. +// plot_type: 'plot', 'semilogx', 'semilogy', 'loglog', 'squared' or 'db' specifies the type of plot. The default is 'plot', which means linear-linear axes. 'squared' is the same as 'plot'. 'dB' plots "10*log10(psd)". This argument is ignored and a spectrum is not plotted if the caller requires a returned value. +// criterion: [optional string arg] model-selection criterion. Limits the number of poles so that spurious poles are not added when the whitened data has no more information in it (see Kay & Marple, 1981). Recognized values are 'AKICc' -- approximate corrected Kullback information criterion (recommended), 'KIC' -- Kullback information criterion 'AICc' -- corrected Akaike information criterion 'AIC' -- Akaike information criterion 'FPE' -- final prediction error" criterion The default is to NOT use a model-selection criterion. +//Description +//This function is being called from Octave +//This function is a wrapper for arburg and ar_psd. +//The functions "arburg" and "ar_psd" do all the work. +//See "help arburg" and "help ar_psd" for further details. +//Examples +//a = [1.0 -1.6216505 1.1102795 -0.4621741 0.2075552 -0.018756746]; +//[psd,f_out] = pburg(a,2); + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 2 | rhs > 8) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 2 then + if(lhs==1) + psd = callOctave("pburg",x,poless) + elseif(lhs==2) + [psd,f_out] = callOctave("pburg",x,poles) + else + error("Wrong number of output argments.") + end + + case 3 then + if(lhs==1) + psd = callOctave("pburg",x,poles,freq) + elseif(lhs==2) + [psd,f_out] = callOctave("pburg",x,poles,freq) + else + error("Wrong number of output argments.") + end + case 4 then + if(lhs==1) + psd = callOctave("pburg",x,poles,freq,Fs) + elseif(lhs==2) + [psd,f_out] = callOctave("pburg",x,poles,freq,Fs) + else + error("Wrong number of output argments.") + end + case 5 then + if(lhs==1) + psd = callOctave("pburg",x,poles,freq,Fs,range) + elseif(lhs==2) + [psd,f_out] = callOctave("pburg",x,poles,freq,Fs,range) + else + error("Wrong number of output argments.") + end + case 6 then + if(lhs==1) + psd = callOctave("pburg",x,poles,freq,Fs,range,method) + elseif(lhs==2) + [psd,f_out] = callOctave("pburg",x,poles,freq,Fs,range,method) + else + error("Wrong number of output argments.") + end + case 7 then + if(lhs==1) + psd = callOctave("pburg",x,poles,freq,Fs,range,method,plot_type) + elseif(lhs==2) + [psd,f_out] = callOctave("pburg",x,poles,freq,Fs,range,method,plot_type) + else + error("Wrong number of output argments.") + end + case 8 then + if(lhs==1) + psd = callOctave("pburg",x,poles,freq,Fs,range,method,plot_type,criterion) + elseif(lhs==2) + [psd,f_out] = callOctave("pburg",x,poles,freq,Fs,range,method,plot_type,criterion) + else + error("Wrong number of output argments.") + end + end +endfunction + + diff --git a/macros/pchip.bin b/macros/pchip.bin Binary files differdeleted file mode 100644 index b698e26..0000000 --- a/macros/pchip.bin +++ /dev/null diff --git a/macros/pchips.bin b/macros/pchips.bin Binary files differdeleted file mode 100644 index 37e0ef5..0000000 --- a/macros/pchips.bin +++ /dev/null diff --git a/macros/peak2peak.bin b/macros/peak2peak.bin Binary files differdeleted file mode 100644 index 263e5aa..0000000 --- a/macros/peak2peak.bin +++ /dev/null diff --git a/macros/peak2rms.bin b/macros/peak2rms.bin Binary files differdeleted file mode 100644 index 8f6cf06..0000000 --- a/macros/peak2rms.bin +++ /dev/null diff --git a/macros/pei_tseng_notch.bin b/macros/pei_tseng_notch.bin Binary files differdeleted file mode 100644 index 40cd414..0000000 --- a/macros/pei_tseng_notch.bin +++ /dev/null diff --git a/macros/peig.bin b/macros/peig.bin Binary files differdeleted file mode 100644 index 88c349f..0000000 --- a/macros/peig.bin +++ /dev/null diff --git a/macros/periodogram.bin b/macros/periodogram.bin Binary files differdeleted file mode 100644 index 39bdd96..0000000 --- a/macros/periodogram.bin +++ /dev/null diff --git a/macros/phaseInputParseAs_ab.bin b/macros/phaseInputParseAs_ab.bin Binary files differdeleted file mode 100644 index 6e216df..0000000 --- a/macros/phaseInputParseAs_ab.bin +++ /dev/null diff --git a/macros/phaseInputParseAs_sos.bin b/macros/phaseInputParseAs_sos.bin Binary files differdeleted file mode 100644 index fedc3ac..0000000 --- a/macros/phaseInputParseAs_sos.bin +++ /dev/null diff --git a/macros/phasedelay.bin b/macros/phasedelay.bin Binary files differdeleted file mode 100644 index 01e0684..0000000 --- a/macros/phasedelay.bin +++ /dev/null diff --git a/macros/phasez.bin b/macros/phasez.bin Binary files differdeleted file mode 100644 index 6b0a1e7..0000000 --- a/macros/phasez.bin +++ /dev/null diff --git a/macros/pmusic.bin b/macros/pmusic.bin Binary files differdeleted file mode 100644 index 1533f71..0000000 --- a/macros/pmusic.bin +++ /dev/null diff --git a/macros/poly2ac.bin b/macros/poly2ac.bin Binary files differdeleted file mode 100644 index 5bdccd5..0000000 --- a/macros/poly2ac.bin +++ /dev/null diff --git a/macros/poly2lsf.bin b/macros/poly2lsf.bin Binary files differdeleted file mode 100644 index 35db930..0000000 --- a/macros/poly2lsf.bin +++ /dev/null diff --git a/macros/poly2rc.bin b/macros/poly2rc.bin Binary files differdeleted file mode 100644 index 69952b4..0000000 --- a/macros/poly2rc.bin +++ /dev/null diff --git a/macros/polyscale.bin b/macros/polyscale.bin Binary files differdeleted file mode 100644 index 7d77a5c..0000000 --- a/macros/polyscale.bin +++ /dev/null diff --git a/macros/polystab.bin b/macros/polystab.bin Binary files differdeleted file mode 100644 index 09a8acb..0000000 --- a/macros/polystab.bin +++ /dev/null diff --git a/macros/polyval.bin b/macros/polyval.bin Binary files differdeleted file mode 100644 index 1375c8e..0000000 --- a/macros/polyval.bin +++ /dev/null diff --git a/macros/pow2db.bin b/macros/pow2db.bin Binary files differdeleted file mode 100644 index 7cc69ea..0000000 --- a/macros/pow2db.bin +++ /dev/null diff --git a/macros/primitive.bin b/macros/primitive.bin Binary files differdeleted file mode 100644 index d83a446..0000000 --- a/macros/primitive.bin +++ /dev/null diff --git a/macros/prony.bin b/macros/prony.bin Binary files differdeleted file mode 100644 index 12ea4f9..0000000 --- a/macros/prony.bin +++ /dev/null diff --git a/macros/pulseperiod.bin b/macros/pulseperiod.bin Binary files differdeleted file mode 100644 index b995439..0000000 --- a/macros/pulseperiod.bin +++ /dev/null diff --git a/macros/pulsesep.bin b/macros/pulsesep.bin Binary files differdeleted file mode 100644 index 3da9b7a..0000000 --- a/macros/pulsesep.bin +++ /dev/null diff --git a/macros/pulsewidth.bin b/macros/pulsewidth.bin Binary files differdeleted file mode 100644 index 6bb29af..0000000 --- a/macros/pulsewidth.bin +++ /dev/null diff --git a/macros/pulstran.bin b/macros/pulstran.bin Binary files differdeleted file mode 100644 index 0bfe42a..0000000 --- a/macros/pulstran.bin +++ /dev/null diff --git a/macros/pyulear.sci b/macros/pyulear.sci new file mode 100644 index 0000000..55278d8 --- /dev/null +++ b/macros/pyulear.sci @@ -0,0 +1,85 @@ +function [psd,f_out] = pyulear(x,poles,freq,Fs,range,method,plot_type) + +//Calculates a Yule-Walker autoregressive (all-pole) model of the data "x" and computes the power spectrum of the model. +//Calling Sequence +//[psd,f_out] = pyulear(x,poles,freq,Fs,range,method,plot_type) +//All but the first two arguments are optional and may be empty. +//Parameters +// x: [vector] sampled data +// poles: [integer scalar] required number of poles of the AR model +// freq: [real vector] frequencies at which power spectral density is calculated [integer scalar] number of uniformly distributed frequency values at which spectral density is calculated. [default=256] +// Fs: [real scalar] sampling frequency (Hertz) [default=1] +// range: 'half', 'onesided' : frequency range of the spectrum is from zero up to but not including sample_f/2. Power from negative frequencies is added to the positive side of the spectrum. 'whole', 'twosided' : frequency range of the spectrum is -sample_f/2 to sample_f/2, with negative frequencies stored in "wrap around" order after the positive frequencies; e.g. frequencies for a 10-point 'twosided' spectrum are 0 0.1 0.2 0.3 0.4 0.5 -0.4 -0.3 -0.2 -0.1 'shift', 'centerdc' : same as 'whole' but with the first half of the spectrum swapped with second half to put the zero-frequency value in the middle. (See "help fftshift". If "freq" is vector, 'shift' is ignored. If model coefficients "ar_coeffs" are real, the default range is 'half', otherwise default range is 'whole'. +// method: 'fft': use FFT to calculate power spectral density. 'poly': calculate spectral density as a polynomial of 1/z N.B. this argument is ignored if the "freq" argument is a vector. The default is 'poly' unless the "freq" argument is an integer power of 2. +// plot_type: 'plot', 'semilogx', 'semilogy', 'loglog', 'squared' or 'db' specifies the type of plot. The default is 'plot', which means linear-linear axes. 'squared' is the same as 'plot'. 'dB' plots "10*log10(psd)". This argument is ignored and a spectrum is not plotted if the caller requires a returned value. + +//Description +//This function is being called from Octave. +//This function is a wrapper for aryule and ar_psd. +//See "help aryule" and "help ar_psd" for further details. +//Examples +//a = [1.0 -1.6216505 1.1102795 -0.4621741 0.2075552 -0.018756746]; +//[psd,f_out] = pyulear(a,2); + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 2 | rhs > 7) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 2 then + if(lhs==1) + psd = callOctave("pyulear",x,poless) + elseif(lhs==2) + [psd,f_out] = callOctave("pyulear",x,poles) + else + error("Wrong number of output argments.") + end + + case 3 then + if(lhs==1) + psd = callOctave("pyulear",x,poles,freq) + elseif(lhs==2) + [psd,f_out] = callOctave("pyulear",x,poles,freq) + else + error("Wrong number of output argments.") + end + case 4 then + if(lhs==1) + psd = callOctave("pyulear",x,poles,freq,Fs) + elseif(lhs==2) + [psd,f_out] = callOctave("pyulear",x,poles,freq,Fs) + else + error("Wrong number of output argments.") + end + case 5 then + if(lhs==1) + psd = callOctave("pyulear",x,poles,freq,Fs,range) + elseif(lhs==2) + [psd,f_out] = callOctave("pyulear",x,poles,freq,Fs,range) + else + error("Wrong number of output argments.") + end + case 6 then + if(lhs==1) + psd = callOctave("pyulear",x,poles,freq,Fs,range,method) + elseif(lhs==2) + [psd,f_out] = callOctave("pyulear",x,poles,freq,Fs,range,method) + else + error("Wrong number of output argments.") + end + case 7 then + if(lhs==1) + psd = callOctave("pyulear",x,poles,freq,Fs,range,method,plot_type) + elseif(lhs==2) + [psd,f_out] = callOctave("pyulear",x,poles,freq,Fs,range,method,plot_type) + else + error("Wrong number of output argments.") + end + + end +endfunction + diff --git a/macros/qp_kaiser.sci b/macros/qp_kaiser.sci new file mode 100644 index 0000000..820fce8 --- /dev/null +++ b/macros/qp_kaiser.sci @@ -0,0 +1,37 @@ +function res = qp_kaiser (nb, at, linear) +//Computes a finite impulse response (FIR) filter for use with a quasi-perfect reconstruction polyphase-network filter bank. +//Calling Sequence +//qp_kaiser (nb, at, linear) +//qp_kaiser (nb, at) +//Parameters +//nb: Number of bands +//at: Attenuation +//linear: When not zero, minimum-phase calculation is omitted. +//Description +//This is an Octave function. +//This version utilizes a Kaiser window to shape the frequency response of the designed filter. Tha number nb of bands and the desired attenuation at in the stop-band are given as parameters. +// +//The Kaiser window is multiplied by the ideal impulse response h(n)=a.sinc(a.n) and converted to its minimum-phase version by means of a Hilbert transform. +//Examples +// qp_kaiser (5, 5, 1) +//ans = +// +// 0.11591 0.25606 0.25606 0.25606 0.11591 + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 2 | rhs > 3) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 2 then + res = callOctave("qp_kaiser", nb, at) + + case 3 then + res = callOctave("qp_kaiser", nb, at, linear) + + end +endfunction diff --git a/macros/rc2ac.bin b/macros/rc2ac.bin Binary files differdeleted file mode 100644 index b50257c..0000000 --- a/macros/rc2ac.bin +++ /dev/null diff --git a/macros/rc2is.bin b/macros/rc2is.bin Binary files differdeleted file mode 100644 index eda8763..0000000 --- a/macros/rc2is.bin +++ /dev/null diff --git a/macros/rc2lar.bin b/macros/rc2lar.bin Binary files differdeleted file mode 100644 index c8e33b7..0000000 --- a/macros/rc2lar.bin +++ /dev/null diff --git a/macros/rc2poly.bin b/macros/rc2poly.bin Binary files differdeleted file mode 100644 index 187d0cd..0000000 --- a/macros/rc2poly.bin +++ /dev/null diff --git a/macros/rceps.bin b/macros/rceps.bin Binary files differdeleted file mode 100644 index ff10b98..0000000 --- a/macros/rceps.bin +++ /dev/null diff --git a/macros/rcosdesign.bin b/macros/rcosdesign.bin Binary files differdeleted file mode 100644 index 652e766..0000000 --- a/macros/rcosdesign.bin +++ /dev/null diff --git a/macros/rectpuls.bin b/macros/rectpuls.bin Binary files differdeleted file mode 100644 index a61a830..0000000 --- a/macros/rectpuls.bin +++ /dev/null diff --git a/macros/rectwin.bin b/macros/rectwin.bin Binary files differdeleted file mode 100644 index 88d68f5..0000000 --- a/macros/rectwin.bin +++ /dev/null diff --git a/macros/remez1.bin b/macros/remez1.bin Binary files differdeleted file mode 100644 index 43589d0..0000000 --- a/macros/remez1.bin +++ /dev/null diff --git a/macros/resample.bin b/macros/resample.bin Binary files differdeleted file mode 100644 index d70f8df..0000000 --- a/macros/resample.bin +++ /dev/null diff --git a/macros/residued.bin b/macros/residued.bin Binary files differdeleted file mode 100644 index 222dc28..0000000 --- a/macros/residued.bin +++ /dev/null diff --git a/macros/residuez.bin b/macros/residuez.bin Binary files differdeleted file mode 100644 index 5a04712..0000000 --- a/macros/residuez.bin +++ /dev/null diff --git a/macros/risetime.bin b/macros/risetime.bin Binary files differdeleted file mode 100644 index d8af143..0000000 --- a/macros/risetime.bin +++ /dev/null diff --git a/macros/rlevinson.bin b/macros/rlevinson.bin Binary files differdeleted file mode 100644 index 864f1db..0000000 --- a/macros/rlevinson.bin +++ /dev/null diff --git a/macros/rms.bin b/macros/rms.bin Binary files differdeleted file mode 100644 index c757115..0000000 --- a/macros/rms.bin +++ /dev/null diff --git a/macros/rooteig.bin b/macros/rooteig.bin Binary files differdeleted file mode 100644 index a07e660..0000000 --- a/macros/rooteig.bin +++ /dev/null diff --git a/macros/rootmusic.bin b/macros/rootmusic.bin Binary files differdeleted file mode 100644 index 8d40df3..0000000 --- a/macros/rootmusic.bin +++ /dev/null diff --git a/macros/rssq.bin b/macros/rssq.bin Binary files differdeleted file mode 100644 index 3401b22..0000000 --- a/macros/rssq.bin +++ /dev/null diff --git a/macros/sampled2continuous.bin b/macros/sampled2continuous.bin Binary files differdeleted file mode 100644 index 49a325a..0000000 --- a/macros/sampled2continuous.bin +++ /dev/null diff --git a/macros/sawtooth.bin b/macros/sawtooth.bin Binary files differdeleted file mode 100644 index 19e5aeb..0000000 --- a/macros/sawtooth.bin +++ /dev/null diff --git a/macros/schtrig.bin b/macros/schtrig.bin Binary files differdeleted file mode 100644 index d89c725..0000000 --- a/macros/schtrig.bin +++ /dev/null diff --git a/macros/schurrc.bin b/macros/schurrc.bin Binary files differdeleted file mode 100644 index c484ac0..0000000 --- a/macros/schurrc.bin +++ /dev/null diff --git a/macros/seqperiod.bin b/macros/seqperiod.bin Binary files differdeleted file mode 100644 index 8c9af6f..0000000 --- a/macros/seqperiod.bin +++ /dev/null diff --git a/macros/sftrans.sci b/macros/sftrans.sci new file mode 100644 index 0000000..916d44d --- /dev/null +++ b/macros/sftrans.sci @@ -0,0 +1,74 @@ +function [Sz, Sp, Sg] = sftrans (Sz, Sp, Sg, W, stop) +//Transform band edges of a generic lowpass filter (cutoff at W=1) represented in splane zero-pole-gain form. +//Calling Sequence +//[Sz, Sp, Sg] = sftrans (Sz, Sp, Sg, W, stop) +//[Sz, Sp] = sftrans (Sz, Sp, Sg, W, stop) +//[Sz] = sftrans (Sz, Sp, Sg, W, stop) +//Parameters +//Sz: Zeros. +//Sp: Poles. +//Sg: Gain. +//W: Edge of target filter. +//stop: True for high pass and band stop filters or false for low pass and band pass filters. +//Description +//This is an Octave function. +//Theory: Given a low pass filter represented by poles and zeros in the splane, you can convert it to a low pass, high pass, band pass or band stop by transforming each of the poles and zeros +//individually. The following table summarizes the transformation: +// +// Transform Zero at x Pole at x +// ---------------- ------------------------- ------------------------ +// Low Pass zero: Fc x/C pole: Fc x/C +// S -> C S/Fc gain: C/Fc gain: Fc/C +// ---------------- ------------------------- ------------------------ +// High Pass zero: Fc C/x pole: Fc C/x +// S -> C Fc/S pole: 0 zero: 0 +// gain: -x gain: -1/x +// ---------------- ------------------------- ------------------------ +// Band Pass zero: b +- sqrt(b^2-FhFl) pole: b +- sqrt(b^2-FhFl) +// S^2+FhFl pole: 0 zero: 0 +// S -> C -------- gain: C/(Fh-Fl) gain: (Fh-Fl)/C +// S(Fh-Fl) b=x/C (Fh-Fl)/2 b=x/C (Fh-Fl)/2 +// ---------------- ------------------------- ------------------------ +// Band Stop zero: b +- sqrt(b^2-FhFl) pole: b +- sqrt(b^2-FhFl) +// S(Fh-Fl) pole: +-sqrt(-FhFl) zero: +-sqrt(-FhFl) +// S -> C -------- gain: -x gain: -1/x +// S^2+FhFl b=C/x (Fh-Fl)/2 b=C/x (Fh-Fl)/2 +// ---------------- ------------------------- ------------------------ +// Bilinear zero: (2+xT)/(2-xT) pole: (2+xT)/(2-xT) +// 2 z-1 pole: -1 zero: -1 +// S -> - --- gain: (2-xT)/T gain: (2-xT)/T +// T z+1 +// ---------------- ------------------------- ------------------------ +// +//where C is the cutoff frequency of the initial lowpass filter, Fc is the edge of the target low/high pass filter and [Fl,Fh] are the edges of the target band pass/stop filter. With abundant tedious +//algebra, you can derive the above formulae yourself by substituting the transform for S into H(S)=S-x for a zero at x or H(S)=1/(S-x) for a pole at x, and converting the result into the form: +// +// H(S)=g prod(S-Xi)/prod(S-Xj) +//Examples +//[Sz, Sp, Sg] = sftrans (5, 10, 15, 20, 30) +//Sz = 4 +//Sp = 2 +//Sg = 7.5000 + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 5 | rhs > 5) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 5 then + if(lhs==1) + Sz = callOctave("sftrans",Sz, Sp, Sg, W, stop) + elseif(lhs==2) + [Sz, Sp] = callOctave("sftrans",Sz, Sp, Sg, W, stop) + elseif(lhs==3) + [Sz, Sp, Sg] = callOctave("sftrans",Sz, Sp, Sg, W, stop) + else + error("Wrong number of output argments.") + end + + end +endfunction diff --git a/macros/sgolay.bin b/macros/sgolay.bin Binary files differdeleted file mode 100644 index 14ab743..0000000 --- a/macros/sgolay.bin +++ /dev/null diff --git a/macros/sgolayfilt.bin b/macros/sgolayfilt.bin Binary files differdeleted file mode 100644 index a834dab..0000000 --- a/macros/sgolayfilt.bin +++ /dev/null diff --git a/macros/shanwavf.bin b/macros/shanwavf.bin Binary files differdeleted file mode 100644 index 300bc07..0000000 --- a/macros/shanwavf.bin +++ /dev/null diff --git a/macros/shiftdata.bin b/macros/shiftdata.bin Binary files differdeleted file mode 100644 index ef78b01..0000000 --- a/macros/shiftdata.bin +++ /dev/null diff --git a/macros/sigmoid_train.bin b/macros/sigmoid_train.bin Binary files differdeleted file mode 100644 index 438d657..0000000 --- a/macros/sigmoid_train.bin +++ /dev/null diff --git a/macros/sinetone.bin b/macros/sinetone.bin Binary files differdeleted file mode 100644 index 0c7254b..0000000 --- a/macros/sinetone.bin +++ /dev/null diff --git a/macros/sinewave.bin b/macros/sinewave.bin Binary files differdeleted file mode 100644 index e5535c2..0000000 --- a/macros/sinewave.bin +++ /dev/null diff --git a/macros/slewrate.bin b/macros/slewrate.bin Binary files differdeleted file mode 100644 index 55c9162..0000000 --- a/macros/slewrate.bin +++ /dev/null diff --git a/macros/sos2cell.bin b/macros/sos2cell.bin Binary files differdeleted file mode 100644 index 924a4b6..0000000 --- a/macros/sos2cell.bin +++ /dev/null diff --git a/macros/sos2ss.bin b/macros/sos2ss.bin Binary files differdeleted file mode 100644 index 03d1147..0000000 --- a/macros/sos2ss.bin +++ /dev/null diff --git a/macros/sos2tf.bin b/macros/sos2tf.bin Binary files differdeleted file mode 100644 index 31a8c0e..0000000 --- a/macros/sos2tf.bin +++ /dev/null diff --git a/macros/sos2zp.bin b/macros/sos2zp.bin Binary files differdeleted file mode 100644 index 34e81b4..0000000 --- a/macros/sos2zp.bin +++ /dev/null diff --git a/macros/sosbreak.bin b/macros/sosbreak.bin Binary files differdeleted file mode 100644 index de8d621..0000000 --- a/macros/sosbreak.bin +++ /dev/null diff --git a/macros/sosfilt.bin b/macros/sosfilt.bin Binary files differdeleted file mode 100644 index 3d70709..0000000 --- a/macros/sosfilt.bin +++ /dev/null diff --git a/macros/specgram.bin b/macros/specgram.bin Binary files differdeleted file mode 100644 index 9ce781f..0000000 --- a/macros/specgram.bin +++ /dev/null diff --git a/macros/spectral_adf.bin b/macros/spectral_adf.bin Binary files differdeleted file mode 100644 index f0cdacf..0000000 --- a/macros/spectral_adf.bin +++ /dev/null diff --git a/macros/spectral_xdf.bin b/macros/spectral_xdf.bin Binary files differdeleted file mode 100644 index 78678da..0000000 --- a/macros/spectral_xdf.bin +++ /dev/null diff --git a/macros/spencer.bin b/macros/spencer.bin Binary files differdeleted file mode 100644 index 4808d26..0000000 --- a/macros/spencer.bin +++ /dev/null diff --git a/macros/ss2sos.bin b/macros/ss2sos.bin Binary files differdeleted file mode 100644 index 9dd7ba3..0000000 --- a/macros/ss2sos.bin +++ /dev/null diff --git a/macros/statelevels.bin b/macros/statelevels.bin Binary files differdeleted file mode 100644 index acdb468..0000000 --- a/macros/statelevels.bin +++ /dev/null diff --git a/macros/stft.bin b/macros/stft.bin Binary files differdeleted file mode 100644 index 6766353..0000000 --- a/macros/stft.bin +++ /dev/null diff --git a/macros/stmcb.bin b/macros/stmcb.bin Binary files differdeleted file mode 100644 index 3fecc2b..0000000 --- a/macros/stmcb.bin +++ /dev/null diff --git a/macros/strips.bin b/macros/strips.bin Binary files differdeleted file mode 100644 index 45199f3..0000000 --- a/macros/strips.bin +++ /dev/null diff --git a/macros/subspaceMethodsInputParser.bin b/macros/subspaceMethodsInputParser.bin Binary files differdeleted file mode 100644 index e2ae41b..0000000 --- a/macros/subspaceMethodsInputParser.bin +++ /dev/null diff --git a/macros/synthesis.bin b/macros/synthesis.bin Binary files differdeleted file mode 100644 index e9730e4..0000000 --- a/macros/synthesis.bin +++ /dev/null diff --git a/macros/tf2sos.bin b/macros/tf2sos.bin Binary files differdeleted file mode 100644 index e0e70a9..0000000 --- a/macros/tf2sos.bin +++ /dev/null diff --git a/macros/tf2zp.bin b/macros/tf2zp.bin Binary files differdeleted file mode 100644 index 2cfc2ce..0000000 --- a/macros/tf2zp.bin +++ /dev/null diff --git a/macros/tf2zpk.bin b/macros/tf2zpk.bin Binary files differdeleted file mode 100644 index ed110d1..0000000 --- a/macros/tf2zpk.bin +++ /dev/null diff --git a/macros/tfestimate.sci b/macros/tfestimate.sci new file mode 100644 index 0000000..e52faf5 --- /dev/null +++ b/macros/tfestimate.sci @@ -0,0 +1,93 @@ +function [Pxx, freq] = tfestimate(x, y, window, overlap, Nfft, Fs, range) + +//Estimate transfer function of system with input x and output y. Use the Welch (1967) periodogram/FFT method. +//Calling Sequence +//tfestimate (x, y, window, overlap, Nfft, Fs, range) +//[Pxx, freq] = tfestimate (…) +//Parameters +//x: Input. +//y: Output. +//window: [real vector] of window-function values between 0 and 1; the data segment has the same length as the window. Default window shape is Hamming. [integer scalar] length of each data segment. The default value is window=sqrt(length(x)) rounded up to the nearest integer power of 2; see 'sloppy' argument. +// overlap: [real scalar] segment overlap expressed as a multiple of window or segment length. 0 <= overlap < 1, The default is overlap=0.5 . +// Nfft: [integer scalar] Length of FFT. The default is the length of the "window" vector or has the same value as the scalar "window" argument. If Nfft is larger than the segment length, "seg_len", the data segment is padded with "Nfft-seg_len" zeros. The default is no padding. Nfft values smaller than the length of the data segment (or window) are ignored silently. +// Fs: [real scalar] sampling frequency (Hertz); default=1.0 +// range: 'half', 'onesided' : frequency range of the spectrum is zero up to but not including Fs/2. Power from negative frequencies is added to the positive side of the spectrum, but not at zero or Nyquist (Fs/2) frequencies. This keeps power equal in time and spectral domains. See reference [2]. 'whole', 'twosided' : frequency range of the spectrum is -Fs/2 to Fs/2, with negative frequencies stored in "wrap around" order after the positive frequencies; e.g. frequencies for a 10-point 'twosided' spectrum are 0 0.1 0.2 0.3 0.4 0.5 -0.4 -0.3 -0.2 -0.1 'shift', 'centerdc' : same as 'whole' but with the first half of the spectrum swapped with second half to put the zero-frequency value in the middle. (See "help fftshift". If data (x and y) are real, the default range is 'half', otherwise default range is 'whole'. +//Description +//This function is being called from Octave. +//Estimate transfer function of system with input x and output y. Use the Welch (1967) periodogram/FFT method. +//Examples +//[Pxx, freq]=tfestimate ([1 2 3], [4 5 6]) +//Pxx = +// +// 1.7500 + 0.0000i +// 1.5947 + 0.3826i +// 1.2824 + 0.0000i +// +//freq = +// +// 0.00000 +// 0.25000 +// 0.50000 + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 2 | rhs > 7) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 2 then + if(lhs==1) + Pxx = callOctave("tfestimate",x,y) + elseif(lhs==2) + [Pxx, freq] = callOctave("tfestimate",x,y) + else + error("Wrong number of output argments.") + end + + case 3 then + if(lhs==1) + Pxx = callOctave("tfestimate",x, y, window) + elseif(lhs==2) + [Pxx, freq] = callOctave("tfestimate",x, y, window) + else + error("Wrong number of output argments.") + end + case 4 then + if(lhs==1) + Pxx = callOctave("tfestimate",x, y, window, overlap) + elseif(lhs==2) + [Pxx, freq] = callOctave("tfestimate",x, y, window, overlap) + else + error("Wrong number of output argments.") + end + case 5 then + if(lhs==1) + Pxx = callOctave("tfestimate",x, y, window, overlap, Nfft) + elseif(lhs==2) + [Pxx, freq] = callOctave("tfestimate",x, y, window, overlap, Nfft) + else + error("Wrong number of output argments.") + end + case 6 then + if(lhs==1) + Pxx = callOctave("tfestimate",x, y, window, overlap, Nfft, Fs) + elseif(lhs==2) + [Pxx, freq] = callOctave("tfestimate",x, y, window, overlap, Nfft, Fs) + else + error("Wrong number of output argments.") + end + case 7 then + if(lhs==1) + Pxx = callOctave("tfestimate",x, y, window, overlap, Nfft, Fs, range) + elseif(lhs==2) + [Pxx, freq] = callOctave("tfestimate",x, y, window, overlap, Nfft, Fs, range) + else + error("Wrong number of output argments.") + end + end +endfunction + + diff --git a/macros/transpose.bin b/macros/transpose.bin Binary files differdeleted file mode 100644 index 4531927..0000000 --- a/macros/transpose.bin +++ /dev/null diff --git a/macros/trial_iirlp2mb.bin b/macros/trial_iirlp2mb.bin Binary files differdeleted file mode 100644 index 89171e5..0000000 --- a/macros/trial_iirlp2mb.bin +++ /dev/null diff --git a/macros/triang.bin b/macros/triang.bin Binary files differdeleted file mode 100644 index 67e8d99..0000000 --- a/macros/triang.bin +++ /dev/null diff --git a/macros/tripuls.bin b/macros/tripuls.bin Binary files differdeleted file mode 100644 index 644e9f3..0000000 --- a/macros/tripuls.bin +++ /dev/null diff --git a/macros/truth.bin b/macros/truth.bin Binary files differdeleted file mode 100644 index 492d7d9..0000000 --- a/macros/truth.bin +++ /dev/null diff --git a/macros/tukeywin.bin b/macros/tukeywin.bin Binary files differdeleted file mode 100644 index f625c8b..0000000 --- a/macros/tukeywin.bin +++ /dev/null diff --git a/macros/udecode.bin b/macros/udecode.bin Binary files differdeleted file mode 100644 index 10ee70d..0000000 --- a/macros/udecode.bin +++ /dev/null diff --git a/macros/uencode.bin b/macros/uencode.bin Binary files differdeleted file mode 100644 index 3edffa8..0000000 --- a/macros/uencode.bin +++ /dev/null diff --git a/macros/ultrwin.bin b/macros/ultrwin.bin Binary files differdeleted file mode 100644 index 6bd2dbe..0000000 --- a/macros/ultrwin.bin +++ /dev/null diff --git a/macros/unshiftdata.bin b/macros/unshiftdata.bin Binary files differdeleted file mode 100644 index 08df42c..0000000 --- a/macros/unshiftdata.bin +++ /dev/null diff --git a/macros/upfirdn.bin b/macros/upfirdn.bin Binary files differdeleted file mode 100644 index 8d5a99d..0000000 --- a/macros/upfirdn.bin +++ /dev/null diff --git a/macros/upsample.bin b/macros/upsample.bin Binary files differdeleted file mode 100644 index 5195035..0000000 --- a/macros/upsample.bin +++ /dev/null diff --git a/macros/upsamplefill.bin b/macros/upsamplefill.bin Binary files differdeleted file mode 100644 index b447000..0000000 --- a/macros/upsamplefill.bin +++ /dev/null diff --git a/macros/var.bin b/macros/var.bin Binary files differdeleted file mode 100644 index ca8d571..0000000 --- a/macros/var.bin +++ /dev/null diff --git a/macros/vco.bin b/macros/vco.bin Binary files differdeleted file mode 100644 index 5c063f2..0000000 --- a/macros/vco.bin +++ /dev/null diff --git a/macros/wconv.bin b/macros/wconv.bin Binary files differdeleted file mode 100644 index f174e54..0000000 --- a/macros/wconv.bin +++ /dev/null diff --git a/macros/welchwin.bin b/macros/welchwin.bin Binary files differdeleted file mode 100644 index 3323c77..0000000 --- a/macros/welchwin.bin +++ /dev/null diff --git a/macros/window.bin b/macros/window.bin Binary files differdeleted file mode 100644 index fe7e1ef..0000000 --- a/macros/window.bin +++ /dev/null diff --git a/macros/wkeep.bin b/macros/wkeep.bin Binary files differdeleted file mode 100644 index a659931..0000000 --- a/macros/wkeep.bin +++ /dev/null diff --git a/macros/wrev.bin b/macros/wrev.bin Binary files differdeleted file mode 100644 index f4baf3d..0000000 --- a/macros/wrev.bin +++ /dev/null diff --git a/macros/xcorr1.sci b/macros/xcorr1.sci new file mode 100644 index 0000000..6ae884d --- /dev/null +++ b/macros/xcorr1.sci @@ -0,0 +1,86 @@ +function [R, lag] = xcorr1 (X, Y, maxlag, scale) +//Estimates the cross-correlation. +//Calling Sequence +//[R, lag] = xcorr1 (X, Y, maxlag, scale) +//[R, lag] = xcorr1 (X, Y, maxlag) +//[R, lag] = xcorr1 (X, Y) +//Parameters +//X: [non-empty; real or complex; vector or matrix] data. +//Y: [real or complex vector] data. +// If X is a matrix (not a vector), Y must be omitted. Y may be omitted if X is a vector; in this case xcorr estimates the autocorrelation of X. +//maxlag: [integer scalar] maximum correlation lag If omitted, the default value is N-1, where N is the greater of the lengths of X and Y or, if X is a matrix, the number of rows in X. +//scale: [character string] specifies the type of scaling applied to the correlation vector (or matrix). is one of: +// ‘none’ - return the unscaled correlation, R, +//‘biased’ - return the biased average, R/N, +//‘unbiased’ - return the unbiased average, R(k)/(N-|k|), +//‘coeff’ - return the correlation coefficient, R/(rms(x).rms(y)), where "k" is the lag, and "N" is the length of X. If omitted, the default value is "none". If Y is supplied but does not have the same +// length as X, scale must be "none". +//Description +//This is an Octave function. +//Estimate the cross correlation R_xy(k) of vector arguments X and Y or, if Y is omitted, estimate autocorrelation R_xx(k) of vector X, for a range of lags k specified by argument "maxlag". If X is a +//matrix, each column of X is correlated with itself and every other column. +// +//The cross-correlation estimate between vectors "x" and "y" (of length N) for lag "k" is given by +// +// N +// R_xy(k) = sum x_{i+k} conj(y_i), +// i=1 +// +//where data not provided (for example x(-1), y(N+1)) is zero. Note the definition of cross-correlation given above. To compute a cross-correlation consistent with the field of statistics, see xcov. +//Examples +//[R, lag] = xcorr1 ( [5 5], [2 2], 2, 'biased' ) +// +//R = +// +// 0 5 10 5 0 +// +//lag = +// +// -2 -1 0 1 2 + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 1 | rhs > 4) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 2 then + if(lhs==1) + R = callOctave("xcorr", X) + elseif(lhs==2) + [R, lag] = callOctave("xcorr", X) + else + error("Wrong number of output argments.") + end + + case 2 then + if(lhs==1) + R = callOctave("xcorr", X, Y) + elseif(lhs==2) + [R, lag] = callOctave("xcorr", X, Y) + else + error("Wrong number of output argments.") + end + + case 3 then + if(lhs==1) + R = callOctave("xcorr", X, Y, maxlag) + elseif(lhs==2) + [R, lag] = callOctave("xcorr", X, Y, maxlag) + else + error("Wrong number of output argments.") + end + case 4 then + if(lhs==1) + R = callOctave("xcorr", X, Y, maxlag, scale) + elseif(lhs==2) + [R, lag] = callOctave("xcorr", X, Y, maxlag, scale) + else + error("Wrong number of output argments.") + end + + end +endfunction diff --git a/macros/xcorr2.bin b/macros/xcorr2.bin Binary files differdeleted file mode 100644 index 795bfe4..0000000 --- a/macros/xcorr2.bin +++ /dev/null diff --git a/macros/xcov1.bin b/macros/xcov1.bin Binary files differdeleted file mode 100644 index 9a57ca5..0000000 --- a/macros/xcov1.bin +++ /dev/null diff --git a/macros/yulewalker.bin b/macros/yulewalker.bin Binary files differdeleted file mode 100644 index 388c88b..0000000 --- a/macros/yulewalker.bin +++ /dev/null diff --git a/macros/zerocrossing.bin b/macros/zerocrossing.bin Binary files differdeleted file mode 100644 index d6b1655..0000000 --- a/macros/zerocrossing.bin +++ /dev/null diff --git a/macros/zp2sos.bin b/macros/zp2sos.bin Binary files differdeleted file mode 100644 index 08c8b1f..0000000 --- a/macros/zp2sos.bin +++ /dev/null diff --git a/macros/zp2ss.bin b/macros/zp2ss.bin Binary files differdeleted file mode 100644 index b8ab377..0000000 --- a/macros/zp2ss.bin +++ /dev/null diff --git a/macros/zp2tf.bin b/macros/zp2tf.bin Binary files differdeleted file mode 100644 index 2597b7d..0000000 --- a/macros/zp2tf.bin +++ /dev/null diff --git a/macros/zplane.bin b/macros/zplane.bin Binary files differdeleted file mode 100644 index 43396b8..0000000 --- a/macros/zplane.bin +++ /dev/null |