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 views (last 30 days)
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 Comments

Sign in to comment.

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!