如果我要画一个sin(x)
图使用八度,我会做绘图错误“内存耗尽或请求的大小太大”
x = -6:0.1:6;
plot (x, sin(x));
和工作原理。
我想画一个双曲线函数,所以我尝试
x = -6:0.1:6;
plot (x, 1/(1+exp(-x)));
但是这给了我
error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt
我试着用x = -4:0.2:4;
,这一次得到了
error: invalid conversion of NDArray to Matrix
error: evaluating argument list element number 2
什么问题?
尝试'plot(x,1 ./(1 + exp(-x)));' –
嗯。有用。重点是什么?使用实数1(1)?哦,我现在看到明智的分工。 –