How can I calculate the iteration using the for loop function and store all iteration outputs in matrix for the big data array? Somebody please help me. Thank you.

조회 수: 2 (최근 30일)
load metals
X= (tspec)';% size X=16 x 1301 double
[m,n] = size(X);
mx = mean(X);
x = (X-mx(ones(m,1),:));%F represent the mean centered X data
y=tconc; % size y=16 x 4 double
k=0:0.01:1;
I=eye(size(x'*x));
b=zeros(size(x'*x));
for j=1:length(k)
b(:,j)=((pinv(x'*x+k(j)*I))*x')*y;
end
  댓글 수: 7

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by