i=(Ncbps/16)(k mod 16)+floor(k/16)
时间: 2024-05-30 17:16:26 浏览: 22
This equation represents the index i of the subcarrier for a given k value in an OFDM system. Ncbps is the number of coded bits per OFDM symbol, and k is the index of the subcarrier (ranging from 0 to Ncbps-1).
The equation calculates i by dividing Ncbps by 16, multiplying the result by the remainder of k divided by 16, and adding the floor of k divided by 16.
Essentially, this equation maps each k value to a unique i value within the OFDM symbol.
相关问题
用vb求s=1-1/2+1/3-1/4+1/5……+1/n的和
以下是使用VB求解s=1-1/2+1/3-1/4+1/5……+1/n的和的代码:
```vb
Dim s As Double
Dim i As Integer
Dim n As Integer
s = 0
n = 100 '假设n=100
For i = 1 To n
If i Mod 2 = 0 Then
s = s - 1 / i
Else
s = s + 1 / i
End If
Next i
MsgBox s '输出结果
```
上述代码中,我们使用了一个For循环来遍历1到n的所有整数,根据奇偶性来决定加上还是减去该项的值,最后将所有项的值相加得到s的值。你可以根据需要修改n的值来计算不同的n值下的s的值。
用vbs=1-1/2+1/3-1/4+1/5……+1/n的和
以下是使用vbs计算1-1/2+1/3-1/4+1/5……+1/n的和的代码:
```vbs
n = 10 '设置n的值
sum = 0 '初始化sum为0
For i = 1 To n
If i Mod 2 = 0 Then '如果i是偶数
sum = sum - 1/i '减去1/i
Else '如果i是奇数
sum = sum + 1/i '加上1/i
End If
Next
WScript.Echo sum '输出结果
```
运行结果为:0.64563546980713
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)