Math functions from matlab to python

2 次查看(过去 30 天)
Prb
Prb 2019-5-2
Hi is this the right way to trnaslate matlab logarithmic function, sqrt and rounding as shown below in python
Matlab:
Shifts(1) = int16(-(round(log2(sqrt(size(Filters{j},3))*2/16))));
Python:
Shifts(1) = np.int16(-(math.round(math.log2(math.sqrt(len(Filters[j][3])*2/16)))))

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Call Python from MATLAB 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by