可以借助于嵌套函数或匿名函数实现附加参数的传递,例如function mainy0 = [1.4; 0.1; 0.1];A = linspace(eps, 10, 20);Y = A * NaN;for ii = length(A)a = A(ii);y = ode45(@eq2, [0 a], y0);Y(ii) = y(end, 1);end