%%% Main File
tspan=[0 4];
%% initial displacement = 0.02m and initial velocity = 0 m/s
y0=[0.02;0];
[t,y]=ode45('vibration',tspan,y0);
plot(t,y(:,1));
grid on
xlabel('time')
ylabel('Displacement')
title('Displacement Vs Time')
legend ('m = 1kg, k = 100 N/M, b = 2, zeta = 0.1, ')
hold on;
%% function file
function yp = vibration(t,y)
m = 1; %% in kg
k = 100; %% in N/m
zeta = 0.1;
wn = sqrt(k/m); %% natural frequency
b = 2*zeta*wn*m
yp = [y(2);(-((b/m)*y(2))-((k/m)*y(1)))];
4-
%%Main
%% initial displacement = 0.02m and initial velocity = 0
m/s
y0=[-0.01;0.5];
[t,y]=ode45('forced',tspan,y0);
plot(t,y(:,1));
grid on
xlabel('time')
ylabel('Displacement')
title('Displacement Vs Time')
legend ('f =10, w = 20 ')
hold on;
%% function
function yp = forced(t,y)
m = 1; %% in kg
k = 100; %% in N/m
zeta =0.1;
wn = sqrt(k/m); %% natural frequency
b = 2*zeta*wn*m
w = 2*wn
f = 10
yp = [y(2);(((f/m)*sin(w*t))-((b/m)*y(2))-((k/m)*y(1)))];
this is the first question GENERAL QUESTIONS FOR EVERYONE TO ANSWER INDIVIDUALLY 1) Type the code below in a new m-f...
MATLAB HELP (a) Use the command dsolve to find general solutions to the differential equations below. i. y 00 + 3y = 0 ii. y 00 + 4y 0 + 29y = 0 iii. y 00 − y/36 = 0 iv. y 00 + 2y 0 + y = 0 v. y 00 + 6y 0 + 5y = 0 (b) Graph each of the solutions in (a) in the same window with 0 ≤ t ≤ 10, using the...
MATLAB question. Please answer all the questions and also upload the code by MATLAB. Thanks. Down vote if no code provided. For the circuit shown above, at the moment t = 0, the switch is closed, find w(t) for 120, No energy is stored in the capacitor and inductor at moment t-0 1. Write the dynamic model for RLC circuit after t> 0? a. Show all vour work and calculations b. Write down the characteristic equation of the transfer function...
I need a matlab code to answer the questions below ICE09B Make an Array Develop a MATLAB code which will produce an array that looks like the following: 4 10 1. You must start with a blank array and build the array with a DNFL. You can NOT just load the array with an assignment statement. Hint: Use "addition" for your variables Square all values in the array 2. Blackboard will ask you for a screenshot of your properly working...
give notes to what each look like and description in text form Lab#1 –Learning Some Basics applied Skills We have completed our initial install of Ubuntu and begun to feel our way around our new system. The following assignment will help you familiarize yourself with your new environment. Please use your system to test answer the following questions. After you have logged in and opened a term window... SECTION I: Simple Navigation of the file system 1. Use df command...
Unix questions, i need help on Hint: Commands to study to answer this question: predefined shell variables, and .profile script file, echo SHELL, HOME, PATH, MAIL and TERM are predefined shell variables. You can use the value of a shell variable in a shell command putting $ in front of it. For example, to display the value of the HOME directory of the user, specify $HOME in the echo command like echo $HOME. Do not give just the value of...
Matlab help 1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes convolution. 3. Find x(t)=x;()*X2(1) by hand using Laplace transforms. 4. Plot the result of part 3 in MATLAB and compare it to that found in part 2. 2) Given the transfer function shown below, do the following: 1. Find the system's impulse response and plot it using MATLAB 2. Repeat...
Please answer the question and include matlab code and plots. Thank You Problem 1: The operation of signal dilation or decimation or down-sampling is defined by y(n) = x(nM) in which the sequence x(n) is down-sampled by an integer factor M. Explore Matlab’s downsample command to implement the above equation. Now generate x(n) = sin(0.125πn), for −50 ≤ n ≤ 50. Decimate x(n) by a factor of 4 to generate y(n). Plot both x(n) and y(n) using subplot and comment...
please write code in MATLAB as well 5. (12 points) Create the following signal in Matlab: x[n] = u(n) - u[n-6] a. Mathematically compute yi[n] = x[n] * x[n] where * means convolution. Now use the conv command to perform the convolution. Graph x[n) and the resulting y(n), both over the interval Osns 20. How many non-zero terms does y(n) have? Does your computational result agree with the Matlab result? b. Repeat a. but this time with yz[n] = x[n]*h[n)...
You have to use MATLAB to solve these questions. Please answer these 5 questions! ercise 1: pae). eate a graph of y cos4x over [0, n]. To illustrate what happens when there are too few points in your domain, first try a step size of n/ 10 1. Which command gives the desired values for x? Select exactiy one of the cholices 2. Which command gives the correct answer for Select exactly one of the choice y - cos(4x) y...
Matlab help 1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes convolution. 3. Find x(t)=x;()*X2(1) by hand using Laplace transforms. 4. Plot the result of part 3 in MATLAB and compare it to that found in part 2. 2) Given the transfer function shown below, do the following: 1. Find the system's impulse response and plot it using MATLAB 2. Repeat...