本文整理匯總了Golang中github.com/wiless/gocomm.SComplex128Obj.Next方法的典型用法代碼示例。如果您正苦於以下問題:Golang SComplex128Obj.Next方法的具體用法?Golang SComplex128Obj.Next怎麽用?Golang SComplex128Obj.Next使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/wiless/gocomm.SComplex128Obj
的用法示例。
在下文中一共展示了SComplex128Obj.Next方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: main
func main() {
N := 20 /// 20 samples
L := 4 /// 5tap channel
begin := time.Now()
var cdma core.CDMA
cdma.InitializeChip()
cdma.SetSpreadCode(vlib.NewOnesC(L), true)
samples := vlib.VectorC(sources.RandNCVec(N, 1))
var data gocomm.SComplex128Obj
/// METHOD A
data.Ts = 1
data.TimeStamp = 0
data.MaxExpected = N
data.Message = ""
for i := 0; i < N; i++ {
data.Next(samples[i])
chips := cdma.SpreadFn(data)
output := cdma.DeSpreadFn(chips)
fmt.Printf("\nTxSymbol %v ", data)
// fmt.Printf("\nTx %v ", chips)
fmt.Printf("\nRxSymbol %v ", output)
}
/// METHOD B
// dataArray.MaxExpected = samples.Size()
// inCHA := gocomm.NewComplex128Channel()
// outputPin := filter.PinByID(1)
// go filter.Filter(inCHA)
// go chipset.Sink(outputPin)
// /// Actual data pushing
// for i := 0; i < N; i++ {
// dataArray.MaxExpected = N
// dataArray.Ch = samples[i]
// inCHA <- dataArray
// }
//fmt.Printf("\nFilter Residues %v", filter.FilterMemory)
// Of code
fmt.Printf("\nTime Elapsed : %v\n", time.Since(begin))
}