今天想画出几个对数函数的图像,结果不成功。y=[(x-1)logx]/(2*x)y=[xlog(x/2+1)]/(2*x)我写了M文件如下:x=1:1:140;y=log2(x.^(x-1))/(2.*x);plot(x,y,'r-')
结果为一条直线,好像结果不对。请问怎么办?如何画图?
y=log2(x.^(x-1))/(2.*x);
改成为:
y=log2(x.^(x-1))./(2.*x);