I am very new to Matlab. I have imported a file called "q3_data.mat". How do I turn this into matrices? I need the first row to be my vector of outcome variables and the remaining three rows into my independent variables. I would like to turn each one into vectors as two of them are dummy variables. How do I do this?

답변 (1개)

Jan
Jan 2018년 3월 12일

0 개 추천

Data = load('q3_data.mat');
Outcome = Data.X(1, :);
Variables = Data.X(2:end, :);
Here I guess, that the data are stored in the matrix X. But this depends on the contents of the file, which I do not know.
What does "turn each one into vectors as two of them are dummy variables" mean? What is "each one" and why does "turning into vectors" help to cope with "dummy variables"?

카테고리

도움말 센터 및 File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

질문:

2018년 3월 10일

답변:

Jan
2018년 3월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by