![]() |
Array Table ?
Hallo,
ich habe mal wieder ein kleines Problem: Ich benötige folgende Konstanden immer paarweise und habe das mal so gelöst: Funzt auch aber sieht doch sch.. aus das mus doch einfacher gehen. Wahrscheinlich ist das si einfach das ich nicht drauf komme:
Delphi-Quellcode:
Das muss doch einfacher gehen?
var
bessel4 : array[0..3] of Double = ( 0.774254, 0.388991, 1.339664, 0.488904 ); bessel5 : array[0..5] of double = ( 0.621595, 0.324533, 1.140177, 0.412845, 0.665639, 0.0 ); bessel6 : array[0..5] of double = ( 0.513054, 0.275641, 0.968607, 0.350473, 1.221734, 0.388718 ); bessel7 : array[0..7] of double = ( 0.433228, 0.238072, 0.830363, 0.301095, 1.094437, 0.339457, 0.593694, 0.0 ); bessel8 : array[0..7] of double = ( 0.372765, 0.208745, 0.720236, 0.262125, 0.975366, 0.297924, 1.111250, 0.316161 ); bessel9 : array[0..9] of double = ( 0.325742, 0.185418, 0.631960, 0.231049, 0.871017, 0.263562, 1.024356, 0.283414, 0.538619, 0.0 ); usw. bis bessel12 max 12 Konstanden //----------------------------------------------------------- procedure test; var besselp : array[0..11]of double; case Integer(_order) of // kack lösung 1:begin for i := 0 to High(bessel1) do besselp[i]:=bessel1[i]; end; 2:begin for i := 0 to High(bessel2) do besselp[i]:=bessel2[i]; end; 3: .. usw. 12: end; for ci := 0 to self.num_of_sections-1 do begin A1 := besselp[I]; A2 := besselp[succ(I)]; //ShowMessage('DesignFilter-Bessel'+#13+FloatToStr(A1)+#13+FloatToStr(A2) pbq[ci].DesignBiquad(bt, fs, fc, A1, A2); end; end; besselp[_order].XXXX Danke Thorsten |
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:04 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz