Differentiation of the position vector.
    2 views (last 30 days)
  
       Show older comments
    
    CHANDRABHAN Singh
 on 9 Feb 2020
  
    
    
    
    
    Answered: fred  ssemwogerere
      
 on 9 Feb 2020
            I have written a code for postion of a vibrating system. I am unable to determine the velocity and acceleration from the expression u. I want to diffrentiate u(i) in the same loop and plot it with t.  How this can be done? Please Help.
m1 = 40;
m = m1*1000/9.81;
k = 3500*1000;
u(1) = 0.01; v(1) = 0.1;
wn = sqrt(k/m);
i=1;
for t=0:.001:1
u(i) = u(1)*cos(wn*t) + (v(1)/wn)*sin(wn*t);
i=i+1;
end
t= 0:0.001:1;
plot(t,u);
grid on
0 Comments
Accepted Answer
  fred  ssemwogerere
      
 on 9 Feb 2020
        Hello, you could make use of the symbolic math toolbox. The page below should get you started:
0 Comments
More Answers (0)
See Also
Categories
				Find more on Acoustics, Noise and Vibration 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!
