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 Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!