NAPA Library - Jul 20 2025

DOCUMENTATION ON THE MAXIMA FUNCTIONS
OF THE MAXIMA INIT FILE

\Simulate\MaximaDos\Functions
Documentation in 'bode.mac'

      Useful MAXIMA User's Functions         (used to process the transfer functions produced by the schematic editor)

      Bode Diagrams                          (needs numeric values for ALL parameters)

      BODE_GAIN( xfr1, fmin, fmax)   BODE_GAIN( xfr1, xfr2, fmin, fmax)  ...  BODE_GAIN( xfr1, xfr2, xfr3, xfr4, xfr5, fmin, fmax)
      BODE_PHASE(xfr1, fmin, fmax)   BODE_PHASE(xfr1, xfr2, fmin, fmax)  ...  BODE_PHASE(xfr1, xfr2, xfr3, xfr4, xfr5, fmin, fmax)
      BODE(xfr1, fmin, fmax)         BODE(xfr1, xfr2, fmin, fmax)        ...  BODE(xfr1, xfr2, xfr3, fmin, xfr4, xfr5, fmin, fmax)

Documentation in 'formula.mac'

      Functions to split the terms of an expanded polynom coded as a string in a list of substrings

     SEPARATE_FIRST_TERM(str, n)
     SPLIT_TERMS(str, n)

Documentation in 'funcs.mac'

      Useful MAXIMA User's Functions                     (used to process the transfer functions produced by the schematic editor)

      HILO(xfer)                 HILO(XFER[3])               return a transfer function after applying limits to HIxx.. and LOyy..

          Elements named with a prefix HI.. (like HI, HI1, HIr, HIc13, etc) are processed as an infinite value
          Elements named with a perfix LO.. (like LO, LO9, LOr, LOc0,  etc) are processed as a zero value

      NUMERIC(xfer)              NUMERIC(XFER[2])            return a transfer function after inserting numerical values if any
      SUBSTITUTE(xfer,parm,val)  SUBSTITUTE(XFER[1],gds1,gn) return a transfer function after substitution

      NUMERATOR(xfr)             NUMERATOR(XFER[1])          return the numerator of a transfer function
      DENOMINATOR(xfr)           DENOMINATOR(XFER[3])        return the denominator of a transfer function

      NCOEFF(xfer,n)             NCOEFF(XFER[2],2)           return the nth coefficient of the numerator of a transfer function
      DCOEFF(xfer,n)             DCOEFF(XFER[1],3)           return the nth coefficient of the denominator of a transfer function

      DC(xfer)                   DC(XFER[1])                 return the DC transfer function
      INF(xfer)                  INF(XFER[1])                return the transfer function at infinite frequency

      NUMFORM(num,n)             NUMFORM(17,-4)              format a number, return string "0017",  sign of num is suppressed
                                 NUMFORM(17, 4)              format a number, return string "17  ",  sign of num is suppressed

      Useful to signal the end of the processing which could be in some cases (very) long

      DONE( )                                                print a line "end of the processing"
      SMAKE( )                                               protected smake against negative value

Documentation in 'limit.mac'

      LIMIT(expr,parm,lim)

      Useful functions used to process the transfer functions produced by the schematic editor
      Functions to compute efficiently limits but to be used ONLY for quotients of polynoms without radices, exp, trig functions..

      LIMZERO(expr, var)
      LIMINFI(expr, var)

Documentation in 'mimo.mac'

     Maxima Function  MIMO_CELL( )                       to be used after a GENERATE_MIMO( ) in SARC Editor

Documentation in 'print.mac'

      ALL_PRINT()       produces the print of all XFER       (not yet implemented)
      PRINT(txt, val)   produces the print   ' txt = XFLOAT(val) ' and returns XFLOAT(val)
      PRINT_LINE(msg)   produces the print   ' msg '

Documentation in 'process.mac'

      Functions to build the NAPA cell corresponding to Z transfer functions (CYCLE = 1, PHASE = 2)

      Z1_CELL(sig)   builds the XFER followed by ZTRANS NAPA cell   (CYCLE modeling)
      Z2_CELL(sig)   builds the XFER followed by ZTRANS NAPA cell   (PHASE modeling)

Documentation in 'xfer.mac'

     Maxima Function  XFER_CELL( )                       to be used after a GENERATE_XFER()
                                                                 or after a GENERATE_MIMO() followed by MIMO2XFER() in SARC Editor

          Elements named with a prefix HI.. (like HI, HI1, HIr, HIc13, etc) will be processed as an infinite value
          Elements named with a perfix LO.. (like LO, LO9, LOr, LOc0,  etc) will be processed as a zero value

Documentation in 'z.mac'

     Maxima Function  Z_CELL( )                  to be used after a GENERATE_Z( <output> ) in SARC Editor
     Currently able to produce only a model based on a cycle, i.e. for Z1() output

          Elements named with a prefix HI.. (like HI, HI1, HIr, HIc13, etc) will be processed as an infinite value
          Elements named with a perfix LO.. (like LO, LO9, LOr, LOc0,  etc) will be processed as a zero value

Documentation in 'ztrans.mac'

     Maxima Function ZTRANS_CELL( <output> )    to be used after a GENERATE_Z( <output> )  in SARC Editor

End