代码搜索结果
找到约 10,000 项符合
Raspberry Pi 的代码
800pi.cpp
#include
long a=10000,
b,
c=2800,
d,
e,
f[2801],
g;
int main()
{
for(;b-c;)
f[b++]=a/5;
for(;d=0,g=c*2;c-=14,printf("%.4d\n",e+d/a),e=d%a)
for(b=c;d+=f[b]*a,f[b
montecarlo_pi.m
%求pi的程序
n=input('n=?');%总次数
m=input('m=?');%步长
k=1;
j=1;
h=0;
for i=1:n
x=rand();y=rand();
rxy=x.^2+y.^2;
if rxy
pi_limboxmaster.m
function limboxmaster();
h=get(gcf,'userdata');
hi=h(5);
hmaster=h(10);
hlimbox=h(14);
limfig=get(hlimbox,'userdata');
limdat=get(limfig{3},'userdata');
limmat=[];
for ii=1:4
limmat=[limm
pi_rescale.m
function rescale(action);
if(nargin==1)
end
mainax=findobj(gcf,'type','axes','tag','MAINAXES');
posax=findobj(gcf,'type','axes','tag','POSITIONAXES');
% try
h=get(gcf,'userdata');
hmsg=h(2);
h
pi_limlnoptions.m
function limlnoptions();
h=get(gcf,'userdata');
hlimbox=h(14);
limdat=get(hlimbox,'userdata');
limdat={limdat{2} limdat{1} limdat{4}};
stdat=get(gcbo,'userdata');
st={'linestyle' 'marker' 'color
pi_zoomfcnend.m
function zoomfcnend();
global ZOOM_LOCKS
set(findobj(gcf,'type','line','tag','PICKS'),'erasemode','normal');
set(gcf,'pointer','arrow');
set(gcf,'windowbuttonupfcn',[]);
set(gcf,'windowbuttonmoti
pi_zoominout.m
function zoominout();
% when MB1 is pressed while zoomscolling is on, user can move plot in and out
set(gcf,'windowbuttonmotionfcn','plotimage(''zoominoutmotion'')');
pi_plotimagebrighten.m
function PlotImageBrighten();
h=get(gcf,'userdata');
hlabel=h(11);
hslider=h(12);
currlvl=get(hlabel,'userdata');
newlvl=get(hslider,'value');
if(currlvl>newlvl)
nsteps=currlvl-newlvl;
pi_zoomoptions.m
function zoomoptions;
global SCALE_OPT NUMBER_OF_COLORS GRAY_PCT CLIP COLOR_MAP NOBRIGHTEN PICKS PICKCOLOR XAXISTOP ZOOM_VALUE ZOOM_LOCKS
xdat=get(gca,'xlim');
ydat=get(gca,'ylim');
val=get(gcbo
pi_lmptenter.m
function lmptenter();
hmeasurefig=get(gcf,'userdata');
hmaster=hmeasurefig(6);
set(0,'currentfigure',hmaster');
h=get(gcf,'userdata');
hlimbox=h(14);
limdat=get(hlimbox,'userdata');
lmptdat=lim