Grocer Function

NAME

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

    1) x1=ones(7,1);x2=[1:7]';y = lag([x1 x2],1,4);z=0.5*ones(7,1);matdiv(x,z)
    2) w = matdiv(x,resid);

    Example 1 gives the matrix:
    !   8.    8.  !
    !   2.    2.  !
    !   2.    4.  !
    !   2.    6.  !
    !   2.    8.  !
    !   2.    10. !
    !   2.    12. !

    Example 2 (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