Using for loop to iterate through matrix of parameters

조회 수: 1 (최근 30일)
bugatti79
bugatti79 2013년 9월 25일
Hi Folks,
I have produced the following code to calculate G_sl a 3*3 matrix where parameters S_1 and S_2 are 3*1 column vectors
for i=1:size(S_1,1) %
k1=S_1(i,1)
for j=1:3
k2=S_2(j)
G_sl(i,j) = k1.*(D_mean(1,1).^0.82).*(Fr(1,1) + k2.*Y(1,1).*Fa(1,1));
end
end
Now I wish to calculate the matrix T_sl= G_sl.*mu_sl for all values of G_sl but with an additional parameter n where mu_sl=f(n) How do I script to calculate for all values of G_sl along n a 3*1 column vector
Any information will be greatly appreciated. Regards B

답변 (0개)

카테고리

Help CenterFile Exchange에서 GPU Computing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by