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!