Overview
Comment: | Fixed generation of odes.sg from .m and .oct simulations. .cc, .m and .oct simulations now all write mtt_data (lower case). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c2d29ab4b72c5ea10840ad8ff0315a0e |
User & Date: | geraint@users.sourceforge.net on 2001-07-13 00:51:39 |
Other Links: | branch diff | manifest | tags |
Context
2001-07-13
| ||
00:55:55 | Added gnuplot view representation check-in: 376fce95c3 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
00:51:39 |
Fixed generation of odes.sg from .m and .oct simulations. .cc, .m and .oct simulations now all write mtt_data (lower case). check-in: c2d29ab4b7 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
2001-07-12
| ||
07:41:18 | JUst do explicit params at the top level check-in: ea814d44ad user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/dat22sg.sh from [688748624c] to [e519db8890].
︙ | ︙ | |||
98 99 100 101 102 103 104 | printf (" </sgw:Cell>\n"); endfunction [u_names,y_names,x_names] = ${sys}_struc; ncol = size(${vec}_names)(1); load ("${sys}_odes.dat2"); | | | | | | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | printf (" </sgw:Cell>\n"); endfunction [u_names,y_names,x_names] = ${sys}_struc; ncol = size(${vec}_names)(1); load ("${sys}_odes.dat2"); nrow = size(mtt_data)(1); # write Time for r = 1:nrow write_cell (r-1,0,mtt_data(r,1)); endfor if ("${vec}" == "y") offset = 1; elseif ("${vec}" == "x") offset = size(y_names)(1); endif for r = 1:nrow for c = 1:ncol write_cell (r-1,c,mtt_data(r,c+offset)); endfor endfor EOF } file=${sys}_odes.sg NX=`mtt_getsize ${sys} x` NY=`mtt_getsize ${sys} y` NTMP=`wc -l ${sys}_odes.dat2 | awk '{print $1}'` NROW=`expr ${NTMP} - 4` # 4 comment lines in mtt_data { write_project_header # states write_worksheet_header "X_${sys}" ${NX} ${NROW} write_state_headings ${sys} write_cell_values ${sys} x |
︙ | ︙ |
Modified mttroot/mtt/bin/trans/make_ode2odes from [a0ec3f6c8d] to [fc0a627e05].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.56 2001/03/30 15:13:58 gawthrop ## Rationalised simulation modes to each return mtt_data ## ## Revision 1.55 2001/03/27 13:21:59 geraint ## Octave version compatibility for save_ascii_data(_for_plotting). ## ## Revision 1.54 2001/03/27 01:14:27 geraint | > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.57 2001/04/01 03:38:54 geraint ## Reset row to zero after write to file, ready for subsequent runs. ## Eliminates SIGSEGV in Octave when _ode2odes called multiple times. ## ## Revision 1.56 2001/03/30 15:13:58 gawthrop ## Rationalised simulation modes to each return mtt_data ## ## Revision 1.55 2001/03/27 13:21:59 geraint ## Octave version compatibility for save_ascii_data(_for_plotting). ## ## Revision 1.54 2001/03/27 01:14:27 geraint |
︙ | ︙ | |||
658 659 660 661 662 663 664 | { static Matrix data; static int row; if (dump_data) { Matrix written_data = data.extract (0, 0, row-1, data.cols ()-1); | | | 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 | { static Matrix data; static int row; if (dump_data) { Matrix written_data = data.extract (0, 0, row-1, data.cols ()-1); $save_ascii_data_function (file, written_data, "mtt_data"); return; } const int nx = x.length (), ny = y.length (); register int col = 0; if (0 == row) |
︙ | ︙ | |||
680 681 682 683 684 685 686 | data.elem (row, ++col) = x.elem (i); row++; if (nrows == row) { #ifdef STANDALONE | | | 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 | data.elem (row, ++col) = x.elem (i); row++; if (nrows == row) { #ifdef STANDALONE $save_ascii_data_function (file, data, "mtt_data"); // cout << data << endl; #else // ! STANDALONE set_global_value ("MTT_data", data); #endif row = 0; } } |
︙ | ︙ |