MATLAB中如何求幂函数,比如0.9的n次方,n=[-5:5]
问题描述:
MATLAB中如何求幂函数,比如0.9的n次方,n=[-5:5]
答
0.9.^nn=[-5:5]0.9.^nn =-5 -4 -3 -2 -1 0 1 2 3 4 5ans =Columns 1 through 71.6935 1.5242 1.3717 1.2346 1.1111 1.0000 0.9000Columns 8 through 110.8100 0.7290 0.6561 0.5905