How to include multiple variables?

I am using a pre-written .m script to perform instrumental variable quantile regression. I need to enter multiple variables for x where-- X=[X,ones(size(y))];. Matlab seems to recognise the second variable but not the first in the list. I have a list of 22 variables that need to be entered in place of X and a single variable in place of y

답변 (1개)

KSSV
KSSV 2016년 5월 12일

0 개 추천

Matlab recognized the second variable 'y' because already it would be defined; where as X is not defined yet and you are calling it. You can assign any number of variables in matlab. You must know how you want to arrange them? Into a scalar or into a vector or into a matrix. Depending on the need you have to define the variables.

카테고리

태그

질문:

2016년 5월 12일

답변:

2016년 5월 12일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by