필터 지우기
필터 지우기

how to make a loop ??

조회 수: 1 (최근 30일)
arkedia
arkedia 2014년 7월 9일
댓글: James Tursa 2018년 4월 10일
i have a regression model with 3 variables x1 x2 x3 and all possible regression models are 2^3=8 x1 , x2,x3 x1x2, x1x3,x2x3 ,no variablesand x1x2x3 i want to apply a method called AIC to choose the correct model , SO I wan to make a loop to apply aic on all subset models ANY Help

답변 (2개)

James Tursa
James Tursa 2014년 7월 9일
편집: James Tursa 2014년 7월 9일
You could use something like this for your outer loop of making variable selections:
patterns = dec2bin(0:7);
for k=1:8
usevariable = patterns(k,:)-'0';
% usevariable (1), usevariable (2), usevariable (3) are either 0 or 1
% you can then pick to use x1, x2, x3 depending on associated value of usevariable
% the pattern will cover all posibilities in the loop
end

alireza bakhshaee
alireza bakhshaee 2018년 4월 10일
Hi all I have 28 text files. each text file has 11 columns. I have to skip first 3 lines of each text file then read them. 1-How can I find the maximum number of each column in each text files? 2-how can I find the most maximum number of the previous question in 28 files?
  댓글 수: 1
James Tursa
James Tursa 2018년 4월 10일
Please delete this Answer and instead open up a new question.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Custom Training Loops에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by