clear all
close all

T = 10;  %s
m = 100;  %kg
F = 10000;  %N
b = 1000;  %N/m/s

w = 2*pi/T;

X = -F/(m*w^2-1i*b*w)

Fmag = abs(F);
Xmag = abs(X)

t = 0:2*T/1000:2*T;
figure
subplot(3,1,1)
[ah31,h311,h312] = plotyy(t,real(F*exp(1i*w*t)),t,real(X*exp(1i*w*t)));

sub


uicontrol('Style', 'slider',...
        'Min',0,'Max',5000,'Value',m,...
        'Position', [400 20 120 20],...
        'Callback', {@SetInertiaSliderBarCallback,h312,t,F,b,w});
    
    
    
    
    
    