Solving for multiple natural frequency and damping ratio given an obfuscated code
2 views (last 30 days)
Show older comments
I have been given an Obfuscated .p file that plays a set of notes from a popular song. I am tasked with finding the natural frequency(Omega_n) in my code and Damping ratio(Zeta in code) for each individual note. I also believe that my Final Value(fv incode) is incorret and I can't seem to figure out how to solve for the multiple zeta and omega values.
Code attatched below
clc, clear all, close all, format compact
%Group Number 23
[t,x]=Jambox(23)
%Plot of Given Jambox Function
figure(1);
plot(t,x);
hold on;
xlabel('Time, t(sec)');
ylabel('Displacement');
title('Given Function');
si=stepinfo(x,t)
os=1.0067e+4
peak=0.9960
t_peak=2.0007
fv=3.4999 %sec
%Calculation of Zeta and Omega
Zeta=sqrt(log(os)^2/(pi^2+log(os)^2))
Omega_n=(pi)/(t_peak*sqrt(1-(Zeta^2)))
%Force of 15 is chosen
m=15/(fv*Omega_n^2)
sys=tf([1/m],[1 2*Zeta*Omega_n Omega_n^2])
figure(2);
tvector1=linspace(0,6,7)
step(15*sys,tvector1)
2 Comments
Srikar Gooty
on 4 May 2022
Could you elaborate what you mean by multiple values of Zeta and Omega_n values?
Answers (0)
See Also
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!