如何让这个“for循环”在matlab中绘制100个值?找不到在哪里包含'i‘
这是共发射极放大器工作点的蒙特卡洛分析图。
for i=1:100
Rb = 377000 * (1 + (rand()*2-1)*0.01);
Rc = 1000 * (1 + (rand()*2-1)*0.01);
Beta = 200 + 100*(rand()*2-1);
Ib = (12-0.7)/Rb;
Ic = Beta*Ib;
Vc = 12-Ic*Rc;
plot(Vc,Ic*1000,'.');
end发布于 2013-02-24 04:31:15

那这个呢?加把你比你拿到的100分??
figure;
axes('NextPlot',add'); %This remove the need to call hold on, also I added an extra ' for SO formatting
for i=1:100
Rb = 377000 * (1 + (rand()*2-1)*0.01);
Rc = 1000 * (1 + (rand()*2-1)*0.01);
Beta = 200 + 100*(rand()*2-1);
Ib = (12-0.7)/Rb;
Ic = Beta*Ib;
Vc = 12-Ic*Rc;
plot(Vc,Ic*1000,'.');
endhttps://stackoverflow.com/questions/15045280
复制相似问题