Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72792

Conformability error when adding a scalar to a matrix

$
0
0
Can someone please tell me why there is a conformability error? Can Stata not add a scalar to a matrix?
P.S. I have Stata 12MP


. clear all

. matrix mat1 = (0,50,100)

. scalar scalar1 = 50

. matrix mat2 = mat1 + scalar1
conformability error
r(503);

. matrix dir
mat1[1,3]

. scalar list _all
scalar1 = 50



Viewing all articles
Browse latest Browse all 72792

Trending Articles