Did I find the right examples for you? yes no

# numpy.matlib.matrix

All Samples(36)  |  Call(34)  |  Derive(0)  |  Import(2)

```            if locals().has_key('ranvec'):
if count in indx:
ranvec = MAT.vstack((ranvec,N.sqrt(varia)*MAT.matrix(N.random.standard_normal(tlena))))
else:
ranvec = MAT.vstack((ranvec,MAT.zeros((1,tlena))))
else:
if count in indx:
ranvec = np.sqrt(varia)*MAT.matrix(N.random.standard_normal(tlena))
```
```            woy = np.zeros((osim_y.shape[1],3))
lam = 1600
yyf = MAT.matrix(hpfilter(data=yy,lam=1600))
osim_y[i1,:] = yyf[0]
# Now filter the state variables!
for i1 in xrange(osim_x.shape[0]):
xx = osim_x[i1,:].__array__().T
wox = np.zeros((osim_x.shape[1],3))
lam = 1600
xxf = MAT.matrix(hpfilter(data=xx,lam=1600))
```
```                woo = np.zeros((osim_o.shape[1],3))
lam = 1600
oof = MAT.matrix(hpfilter(data=oo,lam=1600))
osim_o[i1,:] = oof[0]

```

```def hpfilter(data=None,lam=1600):
if type(data) == type(np.matlib.matrix([1,2,3])) and len(data.shape) == 2:
if data.shape[0] < data.shape[1]: data = data.__array__().T
else: data = data.__array__()
elif type(data) != type(np.array([1,2,3])):
```

```def cffilter(data=None,low=6,high=32,drift=True):
if type(data) == type(np.matlib.matrix([1,2,3])) and len(data.shape) == 2:
if data.shape[0] < data.shape[1]: data = data.__array__().T
else: data = data.__array__()
elif type(data) != type(np.array([1,2,3])):
```

```def bkfilter(data=None,up=6,dn=32,kkl=12):
if type(data) == type(np.matlib.matrix([1,2,3])) and len(data.shape) == 2:
if data.shape[0] < data.shape[1]: data = data.__array__().T
else: data = data.__array__()
elif type(data) != type(np.array([1,2,3])):
```

```
from numpy import exp,log,sqrt,sin,cos,ones,dot
from numpy.matlib import matrix

import param
```
```    the offset (xoff,yoff).
"""
return matrix([[1, 0, xoff],
[0, 1, yoff],
[0, 0,   1 ]])
```
```    around the origin by t radians.
"""
return matrix([[cos(t), -sin(t), 0],
[sin(t),  cos(t), 0],
[  0   ,    0   , 1]])
```
```    the y-axis.
"""
return matrix([[sx,  0, 0],
[ 0, sy, 0],
[ 0,  0, 1]])
```

```
from numpy import exp,log,sqrt,sin,cos,ones,dot
from numpy.matlib import matrix

import param
```
```    the offset (xoff,yoff).
"""
return matrix([[1, 0, xoff],
[0, 1, yoff],
[0, 0,   1 ]])
```
```    around the origin by t radians.
"""
return matrix([[cos(t), -sin(t), 0],
[sin(t),  cos(t), 0],
[  0   ,    0   , 1]])
```
```    the y-axis.
"""
return matrix([[sx,  0, 0],
[ 0, sy, 0],
[ 0,  0, 1]])
```