Write a MATLAB function to calculate the result ft from the

Write a MATLAB function to calculate the result f(t) from the following equation: f(t)= N-Ary Summation^4_n=1 H_ne^-d_n^omega_n^t sin (squareroot 1-(d_n)^2_omega_n^t) The value of H_n, d_n and w_n are according to the table. In the main script use the function \"fplot\" to plot the value of f(t) for t=0 to t=5. The result should look like the following:

Solution

clear all
close all
clc
syms t
for n=1:4
if n==1
Hn=5;
dn=0.1;
wn=1;
elseif n==2
Hn=9;
dn=0.04;
wn=1.3;
elseif n==3
Hn=9.4;
dn=0.04;
wn=1.3;
elseif n==4
Hn=20;
dn=0.03;
wn=1.8;
end
%f=(Hn*exp(-dn*wn*t).*sin(sqrt(1-power(dn,2)).*wn*t))
%fx=f+f;
fplot(@(t)(Hn*exp(-dn*wn*t).*sin(sqrt(1-power(dn,2)).*wn*t)),[0 5])
hold on
end

 Write a MATLAB function to calculate the result f(t) from the following equation: f(t)= N-Ary Summation^4_n=1 H_ne^-d_n^omega_n^t sin (squareroot 1-(d_n)^2_ome

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site