Date: May 20, 2013 9:13 AM
Author: Kam Hoi
Subject: undefined independent variable x

When i type the followings
function [b, CI, R, Yhat_CI, e]=OSL_robust (X, Y, significance)
b=inv(X'*X)*(X'*Y)
cov=inv(X'*X)*(X'*diag(e^2)*X)*inv(X'*X)
se=(diag(cov))^0.5
t=b./se
p=2*(1-cdf('norm',abs(t),0,1))
R2c=1-(((e'*e)/T)/var(Y,1))
R2u=1-((e'*e)/Y'*Y)
AR2c=1-((1/T-K-1)*e'*e)*(var(Y))
AR2u=1-((1/T-K)*e'*e)/((Y'*Y)/T)
CIU=(b+1.96*se)
CIL=(b+1.96*se)
Yhat=Xb
Yhat_CI=[X*CIU,X*CIL]
e=Y-Yhat


It comes out that
??? Input argument "X" is undefined.

Error in ==> OSL_robust at 2
b=inv(X'*X)*(X'*Y)

i am instructed to know that x independent variable X is (T by (K=1))
I am a beginner of matlab, hope anyone can help me~~ Thx