In: Computer Science
Using Octave, analyze the response for the system to a unit step input. Share the code or commands used.
System : x'''+3x''+2x=0
//to clear the memory of all previously created variables
clear all;
close all;
clc
x=linspace(0,4,1000) //make a vector of numbers and put them in X and x is a variable of our equation and roots of the equation are between 0 to 4 that's why we use 0 and 4
y = 1*x^3 + 3*x^2 + 2*x
plot(x,y,"linewidth",3)
set(gca,"linewidth",4,"fontsize",30) //the fonts that this program uses are very small so with a quick search i figured out if i use this command line i can set adjust the font, linesize and grid and basically tells the tool to turn on the XY grid
grid on
(now if we save and run the program it shows u the roots of the equation graphically and if we want to see the actual roots then we have to add some lines)
coeff=[1 3 2];
roots(coeff)
(so now if u again save and run first it gets the roots of equation graphically and also the exact roots in the matrix form)
the roots are between 0 and 2
Hey, hope this helps u,if so give a thumbs up, it means a lot thanks:) In case any problem write a comment I'll sure be helping you. downvotes will be permanent and not be notified to us so i can't help u in that case. Have a good day:)