Overview
Comment: | Fixed multi-output bug. Made sure that u0 is ok. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0791ae253cda3d562dff7a1f23a5d5ce |
User & Date: | gawthrop@users.sourceforge.net on 1996-08-16 14:26:07 |
Other Links: | branch diff | manifest | tags |
Context
1996-08-16
| ||
14:26:37 | Check and fix size of u0. check-in: 153cb373e2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
14:26:07 |
Fixed multi-output bug. Made sure that u0 is ok. check-in: 0791ae253c user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
13:17:57 |
Changed default args to include nx+nz Fixed bug with vector outputs. check-in: 55e8a89afe user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/dm2fr_m from [f9daf7e900] to [5075822501].
︙ | ︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Copyright (c) P.J.Gawthrop, 1996. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.4 1996/08/15 11:52:42 peter ## Now creats a number of versions: ## fr complex frequency response ## lmfr log magnitude of fr ## lpfr phase of fr ## nyfr real and imag parts - Nyquist style ## nifr Nichols style. | > > > | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # Copyright (c) P.J.Gawthrop, 1996. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.5 1996/08/15 16:23:02 peter ## Now uses W in place of w for consistancy with time responses. ## ## Revision 1.4 1996/08/15 11:52:42 peter ## Now creats a number of versions: ## fr complex frequency response ## lmfr log magnitude of fr ## lpfr phase of fr ## nyfr real and imag parts - Nyquist style ## nifr Nichols style. |
︙ | ︙ | |||
38 39 40 41 42 43 44 | echo Creating $1_lmfr.m echo Creating $1_lpfr.m echo Creating $1_nyfr.m echo Creating $1_nifr.m if [ "$2" = "" ]; then | | | | > | | | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | echo Creating $1_lmfr.m echo Creating $1_lpfr.m echo Creating $1_nyfr.m echo Creating $1_nifr.m if [ "$2" = "" ]; then PARAMS='W=logspace(-1,2,100); u0=zeros(nu,1); u0(1)=1;' echo Using default parameter $PARAMS else PARAMS=$2; fi $MATRIX << EOF > dm2fr_m.log [nx,ny,nu,nz,nyz] = $1_def; $PARAMS %Defaults if exist('W')==0 W = logspace(-1,2,100)'; end; if exist('u0')==0 u0 = zeros(nu,1); u0(1) = 1; end; [n,m]=size(W); if m>n W=W'; end; [A,B,C,D,E] = $1_dm($1_numpar) fr = dm2fr(A,B,C,D,E,W,u0) lw = log10(W); lmfr = log10(abs(fr)); pfr = angle(fr)*180/pi; % Complex frequency response write_matrix([W fr], '$1_fr'); |
︙ | ︙ | |||
88 89 90 91 92 93 94 | nyq = [re(:,1) im(:,1)]; for i = 2:ny nyq = [nyq re(:,i) im(:,i)] end; write_matrix(nyq, '$1_nyfr'); % Nichols style | | | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | nyq = [re(:,1) im(:,1)]; for i = 2:ny nyq = [nyq re(:,i) im(:,i)] end; write_matrix(nyq, '$1_nyfr'); % Nichols style re = lmfr; im = pfr; nic = [im(:,1) re(:,1)]; for i = 2:ny nic = [nic im(:,i) re(:,i)] end; write_matrix(nic, '$1_nifr'); EOF |