忘记谁大谁小了,matlab画一个图就好了
正确
x=0:0.01:20
>> y1 = x .^ 1/2;
>> y2 = log(2*x);
>> plot(x, y1, x, y2);
错误
>> y1 = x^0.5; //在这里我没有使用点乘报错
Error using ^
Inputs must be a scalar and a square matrix.
To compute elementwise POWER, use POWER (.^) instead.

网友评论