next up previous contents index
Next: 6.6.2.0.5 Scilab functions Up: 6.6.2 Matrix Example Previous: 6.6.2.0.3 Generated code

6.6.2.0.4 Fortran routines

c      
c     SUBROUTINE f_m
c      
      subroutine f_m(x,a,b,fmat)
      doubleprecision x,a,b
      implicit doubleprecision (t)
      doubleprecision fmat(1,1)
         fmat(1,1) = b+a*sin(x)
      end
c      
c     SUBROUTINE mat
c      
      subroutine mat(x,par,fmat)
      doubleprecision x,par(2)
      implicit doubleprecision (t)
      doubleprecision fmat(2,2)
         t2 = x(1)**2
         fmat(2,2) = x(2)
         fmat(2,1) = par(2)
         fmat(1,2) = x(1)*x(2)
         fmat(1,1) = t2+par(1)
      end

next up previous contents index
Next: 6.6.2.0.5 Scilab functions Up: 6.6.2 Matrix Example Previous: 6.6.2.0.3 Generated code
Scilab Group