我想在同一张图上绘制两个函数。一种是非线性ODE的解,而另一种是两个函数的卷积。请参阅以下question。
我跑步
k = 1000;
N = @(g1,g2) g1^2 + sin(g2);
f = @(t) 0.5 * (1 + tanh(k * t));
w = nonlinearnonhom(N, f);
syms s t
G = nonlinearGreen(N);
wG = ilaplace(laplace(G, t, s) * laplace(f, t, s), s, t);
但是
fplot(@(t) wG, [0 10])
发出类似
的警告Warning: Function behaves unexpectedly on array inputs. To improve performance, properly vectorize
your function to return an output with the same size and shape as the input arguments.
并绘制wG = 0
。
任何建议或想法都会受到赞赏。