In order to solve an ODE using ode45, you need to first define the function to describe the complete dynamics. In the linear state space system you provided, the definition of u is missing. In general, u can be designed as a linear feedback control law, such as u = Kx, where K is a 50-by-50 matrix. Let me give you a simpler example here. Suppose we have A = [0 1; -2 3]; B = [0;1]; K = [-1 -1]; Then, the system function can be constructed as:
function dx = sys(t, x) A = [0 1; -2 3]; B = [0;1]; K = [-1 -1]; u = K*x dx = A*x + B*u; end
Please save the above function in an MATLAB file and name is as sys.m
Then, in a separate MATLAB script file or in the command window, you can simulate the system by executing the following
>> tspan = [0 10]; >> iniCon = [1;-1] >> [t, y] = ode45(@sys, tspan, iniCon);
If you would like to show the simulation result in a figure, try executing >> plot(t,y)
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.