tspan=0:0.1:10; zt0=[0 0]; w = [2 6]; for i=1:numel(w) [T,Z_actual] = ode45(@(t,z)func2q2(t,z,w(i)),tspan,zt0); Z(:,:,i) = Z_actual(:,:); end plot(T,Z(:,1,1),T,Z(:,1,2))
function [zdot]=func2q2(t,z,w) b=[0 ; 5*sin(w*t)] A=[0 ,1 ; -100, -1]; zdot=A*z+b;
Best wishes
Torsten.