用latex表示式子:y= (γW_1 sin〖α_1 〗)/(R_1^2 ) + (γW_2 sin〖α_2 〗)/(R_2^2 ) = 25/〖(25+x^2)〗^(3⁄2) + 36/〖(36+〖(20-x)〗^2)〗^(3⁄2)
时间: 2023-10-06 18:08:08 浏览: 37
您好,以下是用 LaTeX 表示您给出的式子:
$$ y = \frac{\gamma W_1 \sin\alpha_1}{R_1^2} + \frac{\gamma W_2 \sin\alpha_2}{R_2^2} = \frac{25}{(25+x^2)^{3/2}} + \frac{36}{(36+(20-x)^2)^{3/2}} $$
希望对您有帮助!
相关问题
用latex表示式子:I(x,h_2)=(W_1 h_1)/√(〖(h_1^2+x^2)〗^3 )+(W_2 h_2)/√(〖(h_2^2+〖(20-x)〗^2)〗^3 ) =(2×5)/√(〖(25+〖(20-x)〗^2)〗^3 )+(3h_2)/√(〖(h_2^2+〖(20-x)〗^2)〗^3 )
$$I(x,h_2)=\frac{W_1h_1}{\sqrt{(h_1^2+x^2)^3}}+\frac{W_2h_2}{\sqrt{(h_2^2+(20-x)^2)^3}}=\frac{2\times 5}{\sqrt{(25+(20-x)^2)^3}}+\frac{3h_2}{\sqrt{(h_2^2+(20-x)^2)^3}}$$
解释代码def process(recfile, labelfile, resultfile): total_dist = 0 total_label = 0 total_line = 0 total_line_rec = 0 rec_mat = {} label_mat = {} with open(recfile) as f_rec: for line in f_rec: tmp = line.split() key = tmp[0] latex = tmp[1:] rec_mat[key] = latex with open(labelfile) as f_label: for line in f_label: tmp = line.split() key = tmp[0] latex = tmp[1:] label_mat[key] = latex for key_rec in rec_mat: label = label_mat[key_rec] rec = rec_mat[key_rec] dist, llen = cmp_result(label, rec) total_dist += dist total_label += llen total_line += 1 if dist == 0: total_line_rec += 1 wer = float(total_dist)/total_label sacc = float(total_line_rec)/total_line f_result = open(resultfile,'w') f_result.write('WER {}\n'.format(wer)) f_result.write('ExpRate {}\n'.format(sacc)) f_result.close()
这段代码是一个函数,名为 process,它接受三个参数:recfile、labelfile 和 resultfile。函数的主要功能是比较 recfile 和 labelfile 中的内容,计算它们之间的差异,并将结果写入 resultfile 中。具体来说,函数首先读取 recfile 和 labelfile 中的内容,将其存储在 rec_mat 和 label_mat 两个字典中。然后,函数遍历 rec_mat 中的每个键值对,将其与 label_mat 中对应的键值对进行比较,计算它们之间的距离和长度,并统计总的距离、总的长度、总的行数和总的正确行数。最后,函数计算错误率和正确率,并将结果写入 resultfile 中。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.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)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)