Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Help with writing Matlab Code to create x1(s) and x2(s) outputs and graphs. I've already created it using simulink but can't get the code correct
Help with writing Matlab Code to create x1(s) and x2(s) outputs and graphs. I've already created it using simulink but can't get the code correct in matlab.
This what what I currently have...
Systems Car Model meel mass, 22 (t) mAss lo m i K IJ K2 Ct) m2 1 1 m rams kel,(+)-) 21 Ct s-domain 2 bst k xiL4) E92. s- dom awi: X2sk xi Cs) FL (3 X2 Cs) E14 kw X (s) 2 os K Model paramelers . Model Lhe suspen ims stem m Mlab/smn,ink and ste A2 32 .cs CS YLs) wsing m Editor CAUsers fb007941DesktoplSuspensionMatlabCode.m SuspensionMatlabCode.mX+ Suspension Model clear:clc: m2-375; %kg kw-1000; %kN/m 10 gztf ( ' s ' ) ; %sets up TF model t-linspace (0,100,100) 12 yl-step (ythl,t); 15 16 h2-(b s) (ks) (mls 2)(bs) (ks+kw) y2-step (yt h2,t): 18 y3-step (yth3,t): 21 plot (t,y, 'b'); title ("Plots for Suspension Model' xlabel ('Time') 23 25 Hold on 27 Systems Car Model meel mass, 22 (t) mAss lo m i K IJ K2 Ct) m2 1 1 m rams kel,(+)-) 21 Ct s-domain 2 bst k xiL4) E92. s- dom awi: X2sk xi Cs) FL (3 X2 Cs) E14 kw X (s) 2 os K Model paramelers . Model Lhe suspen ims stem m Mlab/smn,ink and ste A2 32 .cs CS YLs) wsing m Editor CAUsers fb007941DesktoplSuspensionMatlabCode.m SuspensionMatlabCode.mX+ Suspension Model clear:clc: m2-375; %kg kw-1000; %kN/m 10 gztf ( ' s ' ) ; %sets up TF model t-linspace (0,100,100) 12 yl-step (ythl,t); 15 16 h2-(b s) (ks) (mls 2)(bs) (ks+kw) y2-step (yt h2,t): 18 y3-step (yth3,t): 21 plot (t,y, 'b'); title ("Plots for Suspension Model' xlabel ('Time') 23 25 Hold on 27Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started