Matlab plots

  • Thread starter kostantina
  • Start date
  • #1
10
0

Homework Statement



Oscillation in mechanical structures can often be described by the function:

y(t)=(e^(-t/τ))*sin(ωt+θ)

Where t is time , ω is oscillation frequency in radians per unit time. The oscillations have a period of 2*π/ω and their amplitudes decay in time at a rate determined by τ which is called the time constant. THe smaller the value of τ the faster the oscillations die out/


Homework Equations



a.) Use the above information to develop a criterion for choosing the spacing of t values and the upper limit on t to obtain an accurate plot of y(t). (Hint two cases: 4τ>2π/ω and 4τ<2π/ω)

b) Plot y(t) for τ= 10, ω=π and θ=2

c)Plot y(t) for τ= 0.1, ω=8π and θ=2


The Attempt at a Solution



My attempt is below, however what is bothering me is question (a). A criterion for choosing the spacing values for t and the upper limit. ?? Can't figure it out and also the hint.. How is that related? I just played around with numbers, and got those plots.



tau=10;
omega=pi;
fi=2;
t=(-40:0.1:10);
f=(exp(-t./tau)).*sin(omega.*t+fi);
subplot(2,1,1)
plot(t,f)

tau2=0.1;
omega2=8*pi;
fi=2;
t=(-0:0.1:80);
f2=(exp(-t./tau2)).*sin(omega2.*t+fi);
subplot(2,1,2)
plot(t,f2)
 

Answers and Replies

  • #2
Simon Bridge
Science Advisor
Homework Helper
17,857
1,654
Try playing around some more then and see what makes the spacing of t values too big.
What do the two limiting cases represent physically?
 

Related Threads on Matlab plots

  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
1
Views
862
  • Last Post
Replies
1
Views
8K
  • Last Post
Replies
6
Views
649
  • Last Post
Replies
10
Views
10K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
1
Views
547
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
5
Views
23K
  • Last Post
Replies
4
Views
557
Top