1
我试图在Octave中绘制该函数,并且出现一个我听不懂的错误。我已经成功地绘制了其他功能,但由于某种原因,这一个没有工作。尝试绘制函数时出现八度误差N * log2(N)
N=[1:1:50];
y1Values = N*log2(N);
%plot (n, y1Values, 'LineWidth',2, n,y2Values, 'LineWidth',3);
plot (N, [ y1Values' ], 'LineWidth',3);
legend("e^N");
这会产生这个错误
error: asstemp: operator *: nonconformant arguments (op1 is 1x50, op2 is 1x50)
错误:在第2行第10列
我不知道为什么*将是一个问题,从 asstemp调用。它没有任何其他表达式。我需要以不同的方式写出表达方式吗?