2022年大学物理学-计算物理-编程练习题答案.docx
精选学习资料 - - - - - - - - - 学而不思就惘,思而不学就殆clear all close all for t=1:50 radiust=t/10; r=0.1*t; dcm='D:Q 因子' rds=num2strr; sav_name=dcm rds 'um.txt' fid1 = fopensav_name,'rt' for w=1:50 Q_realw,t=fscanffid1,'%e',1; end fclosefid1; 名师归纳总结 - - - - - - -第 1 页,共 10 页精选学习资料 - - - - - - - - - 学而不思就惘,思而不学就殆end Q=Q_real' for t=1:50 radiust=t/10; r=0.1*t; dcm='D:P 因子' rds=num2strr; sav_name=dcm rds 'um.txt' fid1 = fopensav_name,'rt' for w=1:180 Q_realw,t=fscanffid1,'%e',1; end fclosefid1; end 名师归纳总结 - - - - - - -第 2 页,共 10 页精选学习资料 - - - - - - - - - 学而不思就惘,思而不学就殆P=Q_real' % 角度与波长的挑选 %Pr,theta Qr,lamda; %- 初始化种群for g=1:120 %120 个种群 angle_numg=ceil50*rand1; wave_numg=50-angle_numg; for a=1:angle_numg try_1g,a=ceil180*rand1; end for a=1:wave_numg try_1g,a+angle_numg=ceil50*rand1+200; end 名师归纳总结 - - - - - - -第 3 页,共 10 页精选学习资料 - - - - - - - - - 学而不思就惘,思而不学就殆end minn=1000000000; %- for u=1:800 for g=1:120 for a=1:50 if try_1g,a<=180 for r=1:50 C_tryr,a=Pr,try_1g,a; end else for r=1:50 C_tryr,a=Qr,try_1g,a-200; 名师归纳总结 - - - - - - -第 4 页,共 10 页精选学习资料 - - - - - - - - - 学而不思就惘,思而不学就殆end end end cond_tryg=condC_try; end %- 找最大最小值 max_cond_try=maxcond_try; min_cond_try=mincond_try; for g=1:120 if cond_tryg=max_cond_try max_cond_try_order=g; end end for g=1:120 名师归纳总结 - - - - - - -第 5 页,共 10 页精选学习资料 - - - - - - - - - 学而不思就惘,思而不学就殆if cond_tryg=min_cond_try min_cond_try_order=g; end end %-for s=1:50 用最小的掩盖最大的try_1max_cond_try_order,s=try_1min_cond_try_order,s; end % 交叉 for g=1:60 cross_times=ceil50*2*rand1; if cross_times>50 corss_times=cross_times-50; end for i=1:cross_times 名师归纳总结 - - - - - - -第 6 页,共 10 页精选学习资料 - - - - - - - - - 学而不思就惘,思而不学就殆cross_serial=ceil50*2*rand1; if cross_serial>50 cross_serial=cross_serial-50; end carrier=try_1g*2-1,cross_serial; try_1g*2-1 ,cross_serial=try_1g*2,cross_serial; try_1g*2, cross_serial=carrier; end end % 转变组与组之间的次序for s=1:50 名师归纳总结 - - - - - - -第 7 页,共 10 页精选学习资料 - - - - - - - - - 学而不思就惘,思而不学就殆carrier_arrys=try_11,s; end for g=1:120 if g<120 for s=1:50 try_1g,s=try_1g+1 ,s; end end if g=120 for s=1:50 try_1g,s= carrier_arrys; end end end u if min_cond_try<minn minn=min_cond_try; for s=1:50 num_needs=try_1min_cond_try_order,s; 名师归纳总结 - - - - - - -第 8 页,共 10 页精选学习资料 - - - - - - - - - 学而不思就惘,思而不学就殆end end min_cond=minn max_cond= max_cond_tryif min_cond=max_cond ballode break end end num_need min_cond名师归纳总结 - - - - - - -第 9 页,共 10 页精选学习资料 - - - - - - - - - 学而不思就惘,思而不学就殆Of course, there are many things to learn if I were enrolled into my ideal research field. First of all, I hope I can build up a systematic view of physics, especially in the field of optics. On the other hand, Im dreaming of the participation of some relevant projects of my major. In that way, I can get more experiences in practice. And what is more, if it is possible, I hope I can continue to study for a doctorate degree. In a word, Im looking forward to making up a solid foundation for my future profession. 光学当中我认为最前沿的一块就是我的讨论方向:激光物理与激光技术; 自从第一台激光器红宝石激光器问世以来,光学发生了划时代的巨变; 激光由于其良好的相干性、 方向性、高亮度,在光学当中有非常广泛的应用;作为光源许多精密的光学试验都是以激光名师归纳总结 - - - - - - -第 10 页,共 10 页