clear
M = 1;
K = 1;
VarB = [0:0.1:10];
k = 1
N = length(VarB);
for I = 1:N,
    clc
    k = k+1
    B = VarB(I);
    sim('BASIC_MBK_System_3_Disturbances');
    n = length(J);
    Jforce(I) = J(n);
    Jvelocity(I) = J1(n);
    Jposition(I) = J2(n);
    Uforce(I) = U(n);
    Uvelocity(I) = U1(n);
    Uposition(I) = U2(n);
    Eforce(I) = E(n);
    Evelocity(I) = E1(n);
    Eposition(I) = E2(n);
end
clf
plot(VarB,Jvelocity,VarB,Evelocity,VarB,Uvelocity),grid on, xlabel('B'), ylabel('J, E and U')