Changeset 13052 in project for release/3/nemo/trunk/nemomatlab.scm
 Timestamp:
 01/21/09 07:45:56 (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

release/3/nemo/trunk/nemomatlab.scm
r13050 r13052 172 172 173 173 ((op . rest) 174 (let ((op (case op ((pow) '^) ( else op))))174 (let ((op (case op ((pow) '^) ((ln) 'log) (else op)))) 175 175 (let ((fe 176 176 (if (member op matlabops) … … 204 204 (let ((fx (formatexpr/MATLAB indent+ x))) fx)) rest))))) 205 205 206 (let ((op (case op ((neg) ') ( (ln) 'log) (else op))))206 (let ((op (case op ((neg) ') (else op)))) 207 207 (formatfncall/MATLAB indent op (map (lambda (x) (formatexpr/MATLAB indent+ x)) rest)))))) 208 208 (if rv … … 380 380 381 381 382 (define (poset> stateinitdefs poset sys)382 (define (poset>initdefs poset sys) 383 383 (foldright 384 384 (lambda (lst ax) 385 (fold (lambda (x ax) 385 (foldright 386 (lambda (x ax) 386 387 (matchlet (((i . n) x)) 387 388 (let ((en (environmentref sys n))) … … 398 399 (cons (stateinit name initial) ax) 399 400 ax)) 400 401 401 402 (else ax)) 402 403 ax)))) … … 567 568 (reactioneqdefs (poset>reactioneqdefs poset sys)) 568 569 569 (initeqdefs (poset> stateinitdefs poset sys))570 (initeqdefs (poset>initdefs poset sys)) 570 571 571 572 (conserveeqdefs (map (lambda (eq) (list 0 `( ,(second eq) ,(first eq)))) … … 743 744 constdefs) 744 745 745 (if (not (null? initeqdefs))746 (foreach (lambda (def)747 (let ((n (matlabname (first def)) )748 (b (second def)))749 (pp indent+ ,(expr>string/MATLAB b n))))750 asgneqdefs))751 752 746 (foreach (lambda (def) 753 747 (let* ((n (first def)) 754 748 (ni (lookupdef n stateindexmap)) 755 749 (b (second def))) 756 (pp indent+ ,(expr>string/MATLAB b (if ni (s+ "y0(" ni ")") n))))) 750 (pp indent+ ,(expr>string/MATLAB b n)) 751 (if ni (pp indent+ ,(expr>string/MATLAB n (s+ "y0(" ni ")")))))) 757 752 initeqdefs) 758 753
Note: See TracChangeset
for help on using the changeset viewer.