DATA Step, Macro, Functions and more

function to perform matrix operations

Reply
New Contributor
Posts: 3

function to perform matrix operations

I am new to SAS. I am trying to write a simple function using proc fcmp to return the scalar product of two matrices

proc fcmp;

    function ReturnTheta(a{*},b{*});

        ScalarProductOfAandB=a`*b;

     return ScalarProductOfAandB;

     endsub;

I am unable to perform transpose of matrix 'a'  because ` is not a recognized operator. I realize i need to be inside proc iml or use built in matrix functions to do matrix operation, but is there a way to create a simple function which accept matrix arguments , perform some matrix operation and return result ?

Ask a Question
Discussion stats
  • 0 replies
  • 140 views
  • 0 likes
  • 1 in conversation