For loop operation on vectors
1 次查看(过去 30 天)
显示 更早的评论
if true
function IB= ibtest(VCC)
RL =[1000, 10000, 200000, 400000, 600000, 800000, 1000000];
RB=22000; RP=50; R=470; B=300;
i=0;
for t=1:length(RL)
i=i+1;
IB(i)=((VCC - 2.1)*(RL(i) + RP)) / ( (RL(i) * RP) + (RB*(RL(i) + RP)) + (301 * 470 * (RL(i) + RP)) );
end
IB
end
% code
end
I expect IB to be vector having different values but this code give me IB as a vector but all the elements are identical... I dont know what is the problem?
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!