Using for loop to iterate through matrix of parameters
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(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!