Overview
Comment:New argument to add zero columns -- useful if less basis functions than inputs
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 80a14a1b06eac2d9a20f004879d7b1673cf3181c2a0a30c537aace7c1ba8f156
User & Date: gawthrop@users.sourceforge.net on 2002-04-28 15:38:06
Other Links: branch diff | manifest | tags
Context
2002-04-28
18:41:27
Fixed [ 549658 ] awk should be gawk.
Replaced calls to awk with call to gawk.
check-in: 66bb5feadf user: geraint@users.sourceforge.net tags: origin/master, trunk
15:38:06
New argument to add zero columns -- useful if less basis functions than inputs check-in: 80a14a1b06 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:36:55
Modified to handle less basis functions than total inputs check-in: eb661d45c2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/control/PPP/ppp_ustar.m from [0be0149c8e] to [84e1f5fdcb].

1
2
3
4
5
6
7
8
9
10


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28




29
30
31
32
33
34
35
function Ustar = ppp_ustar (A_u,n_u,tau,order,packed)

  ## usage:  Us = ppp_ustar(A_u,n_u,tau,order,packed)
  ##
  ## Computes the U* matrix at time tau in terms of A_u
  ## n_u : Number of system inputs
  ## If tau is a vector, computes U* at each tau and puts into a row vector:
  ## If packed==1
  ##     Ustar = [Ustar(tau_1) Ustar(tau_2) ...]
  ## else Ustar = [Ustar(tau_1); Ustar(tau_2) ...]


  ## Copyright (C) 1999 by Peter J. Gawthrop
  ## 	$Id$	

  if nargin<2
    n_u = 1;
  endif
  
  if nargin<3
    tau = 0;
  endif
  
  if nargin<4
    order = 0;
  endif
  
  if nargin<5
    packed=1;
  endif




  

  [n,m] = size(A_u);		# Size of composite A_u matrix
  N = m;			# Number of U* functions per input  
  nm = n/m;

  if (nm != n_u)&&(n!=m)	# Check consistency
|









>
>


















>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function Ustar = ppp_ustar (A_u,n_u,tau,order,packed,n_zero)

  ## usage:  Us = ppp_ustar(A_u,n_u,tau,order,packed)
  ##
  ## Computes the U* matrix at time tau in terms of A_u
  ## n_u : Number of system inputs
  ## If tau is a vector, computes U* at each tau and puts into a row vector:
  ## If packed==1
  ##     Ustar = [Ustar(tau_1) Ustar(tau_2) ...]
  ## else Ustar = [Ustar(tau_1); Ustar(tau_2) ...]
  ## n_zero extra zero columns appended

  ## Copyright (C) 1999 by Peter J. Gawthrop
  ## 	$Id$	

  if nargin<2
    n_u = 1;
  endif
  
  if nargin<3
    tau = 0;
  endif
  
  if nargin<4
    order = 0;
  endif
  
  if nargin<5
    packed=1;
  endif
  
  if nargin<6
    n_zero=0;
  endif
  

  [n,m] = size(A_u);		# Size of composite A_u matrix
  N = m;			# Number of U* functions per input  
  nm = n/m;

  if (nm != n_u)&&(n!=m)	# Check consistency
56
57
58
59
60
61
62




63
64
    if (packed==1)
      Ustar = [Ustar ustar];
    else
      Ustar = [Ustar; ustar];
    endif
  endfor






endfunction







>
>
>
>
|

62
63
64
65
66
67
68
69
70
71
72
73
74
    if (packed==1)
      Ustar = [Ustar ustar];
    else
      Ustar = [Ustar; ustar];
    endif
  endfor

  if (n_zero>0)
    [N,M] = size(Ustar);
    Ustar = [Ustar zeros(N, n_zero)];
  endif
  
endfunction


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]