<< longrun_variance Basic functions matmul >>

Grocer >> Basic functions > matdiv

matdiv

matrix quotient

CALLING SEQUENCE

[out]=matdiv(x,y)

PARAMETERS

Input

* x,y = two matrices (not of the same dimension but that are row or column compatible)

 

Output

* out = x./y where x and y are row or column compatible

DESCRIPTION

Performs matrix quotient even if matrices are not of the same dimension, but are row or column compatible

EXAMPLE

x1=ones(7,1);x2=[1:7]';y = lag([x1 x2],1,4);z=0.5*ones(7,1);matdiv(x,z)
//returns:
 
//!   8.    8.  !
//!   2.    2.  !
//!   2.    4.  !
//!   2.    6.  !
//!   2.    8.  !
//!   2.    10. !
//!   2.    12. !
 
 
 w = matdiv(x,resid);
// Example taken from lad: makes the term by term division of each column of matrix x ((nxk) matrix of exogenous variables) by the (nx1) vector of absolute residuals from the ols regression of y on x.

AUTHOR

Eric Dubois 2002

Report an issue
<< longrun_variance Basic functions matmul >>