Scilab
Posts  1 - 1  of  1
34thomas
Please help!

i'm trying to plot an amplitude response curve for a forced damped harmonic oscillator. the equation is

a=(f0/m)/(sqrt((w^2-z^2)^2+(b^2)/(m^2)*z^2))

where z is the angular frequency of the driving force. bottom line, i'm supposed to compute the values of a for z values ranging from 0 to 30

i entered the commands like this

-->m=10; b=5; k=120; f0=50;

-->z=0:1:30;

-->w=sqrt(k/m);

-->a=(f0/m)/(sqrt((w^2-z^2)^2+(b^2)/(m^2)*z^2))

however, the values for a calculated are incorrect. i get sth like
a =

0.0000119
0.0000109
0.0000080
0.0000033
0.0000044
0.0000131

when i try sth like

-->z=3

-->a=(f0/m)/(sqrt((w^2-z^2)^2+(b^2)/(m^2)*z^2))

i get a = 1.4907, which is the correct value, but clearly different from 0.0000033 as calculated using a range of values for z

why doesn't it work when i use z=0:1:30? can someone tell me what i'm doing wrong?
Save
Cancel
Reply
 
x
OK