您好,今天芳芳来为大家解答以上的问题。matlab sqrt函数用法,matlab sqrt函数相信很多小伙伴还不知道,现在让我们一起来看看吧!
1、是计算平方根的函数,比如sqrt(4)=2等等。
2、可以是一个数,也可以是一个矩阵。
3、官方解释:B = sqrt(X) returns thesquare root of each element of the array X. Forthe elements of X that are negative or complex, sqrt(X) producescomplex results.举例说明:>> sqrt(2)ans =1.4142>> sqrt(rand(4))ans =0.8302 0.4785 0.7337 0.32660.8650 0.9557 0.9981 0.98080.6712 0.3904 0.2796 0.06810.2895 0.9087 0.6653 0.8803>> sqrt(4)ans =2。
本文就为大家分享到这里,希望小伙伴们会喜欢。