Question: MatLab I need help correcting my code for the following This my code and the comment that was made ( Case i not analyzed. No
MatLab I need help correcting my code for the following



This my code and the comment that was made (Case i not analyzed. No assessment of observability.)
clc; clear all; close all;
% Define the parameters as below. m1 = 2; m2 = 1; L = 0.75; g = 9.81;
% define the matrices A,B,C and D as below. A = [0 1 0 0; 0 0 m2*g/m1 0; 0 0 0 1; 0 0 (m1+m2)*g/(m1*L) 0]; % canonical form. B = [0 0; 1/m1 1/(m1*L); 0 0; 1/(m1*L) (m1+m2)/(m1*m2*L^2)]; C = [1 0 0 0;0 0 1 0]; % outputs w and theta D = [0 0;0 0];
states = {'w' 'wDdot' 'Theta' 'ThetaDot'}; % states are defined here for your convenient nomenclature
inputs = {'f' 'tau'}; % inputs are defined as f and tau the forces outputs = {'w' 'Theta'}; % the outputs w and theta % Define the model as MIMO multiple input and multiple output using state % space formulation sys_mimo = ss(A,B,C,D,'statename',states,... 'inputname',inputs,... 'outputname',outputs)
TF_Matrix = tf(obsv(sys_mimo)) % print the transfer function matrix from % multiple input to multiple output
Ob = obsv(A,C); unob = length(A)-rank(Ob)
Determine if the CE2 system is observable for all three cases (cases from CE1.2b and numeric parameters from CE2.2a)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
