exec('SCI/demos/simulation/npend/n_pendulum.sci'); /// \sleftarrow{\normalfont load scilab functions } exec('npend_draw.sci'); /// @@prerequisite affectations npend_build_and_load() ; /// \sleftarrow{\normalfont calling \verb+ilib_for_link+} n=np(); r=ones(1,n); m=ones(1,n); j=ones(1,n); g=9.81; y0=0*ones(2*n,1);tt=0:0.05:10; /// \sleftarrow{\normalfont \( (\theta,\dot{\theta})(0) =0 \) } yt=ode(y0,0,tt,'npend'); /// \sleftarrow{\normalfont calling \verb+ode+} draw_chain_from_angles(yt(1:$/2,:),r,1); /// \sleftarrow{\normalfont Figure~\ref{npenddes}} xs2ps(0,'npend') /// @@prerequisite unix(SCI+'/bin/Blatexpr 1 1 npend '); /// @@prerequisite