code says not enough inputs in inline function
显示 更早的评论
b=2.2;
d=.4;
g=5.1;
w=6;
m=1.1;
n=2;
fsize=15;
sys=inline(' [(x(1).*(1-(x(1)/g)))-(x(1).*x(2)/((1+m*n)*(w*x(1).^2+1)+x(1))); b.*x(2)*(x(1)+n*(w*x(1).^2+1))./((1+m*n)*(w*x(1).^2+1)+x(1))-d*x(2)]');
options = odeset('RelTol' ,1e-4, 'AbsTol' ,1e-4);
[t,xa]=ode45(sys,[0 100],[.2 1.2],options);
set(gca, 'xtick', [0:2:8], 'FontSize' ,fsize);
plot (xa (: ,1), xa (:, 2));
can any one help me with the code plss Thanqq
2 个评论
@Murari Kanumoori: The very first line of the inline documentation states "inline will be removed in a future release. Use Anonymous Functions instead."
Can you explain why you need to use an inline function instead of a much better anonymous function? We are not asking to be annoying, but because we want to give you the best answer we can. And in this case, using anonymous functions is much better than using inline functions.
Murari Kanumoori
2017-9-21
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Function Creation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!