⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 opt_build.htm

📁 Matlab实现光线跟踪算法
💻 HTM
字号:
<HTML>                                              <HEAD>                                                <TITLE>/</TITLE>                                    <META NAME="GENERATOR" CONTENT="HTML-TOOLBOX ">   </HEAD>                                             <BODY bgcolor="#FFFFF0"> <HR WIDTH="100%"></P> <CENTER><P><FONT COLOR="#000000"><FONT SIZE=+3>Cross-linked m-file</FONT></FONT></P></CENTER> <CENTER><P><FONT COLOR="#000000"><FONT SIZE=+1></FONT></FONT></P></CENTER> <CENTER><P><FONT COLOR="#000000"><FONT SIZE=+2>opt_build.m</FONT></FONT></P></CENTER> <CENTER><P><FONT COLOR="#000000"><FONT SIZE=+1>Located in:</FONT></FONT></P></CENTER> <CENTER><P><FONT COLOR="#000000"><FONT SIZE=+1>/home/bjorn/matlab/Optical_bench</FONT></FONT></P></CENTER> <P><HR WIDTH="100%"></P> <P><FONT COLOR="#000000"><FONT SIZE=+2>Function synopsis</FONT></FONT></P> <P><FONT COLOR="#000000"><FONT SIZE=+1> OPT_ELEMS = OPT_BUILD(FILE)                                                                                                                         </FONT></FONT></P> <P><HR WIDTH="100%"></P> <P><FONT COLOR="#000000"><FONT SIZE=+2>Function comments</FONT></FONT></P> <pre> % % OPT_BUILD - Builds optical system specified in FILE % % See also README OPT.EXMPL </pre> <P><HR WIDTH="100%"></P> <P><FONT COLOR="#000000"><FONT SIZE=+1>m-files called by opt_build.m</FONT></FONT></P> <UL> <LI><A HREF ="opt_lens.htm">opt_lens</A></LI> <LI><A HREF ="opt_aperture.htm">opt_aperture</A></LI> <LI><A HREF ="opt_fcn.htm">opt_fcn</A></LI> <LI><A HREF ="opt_prism.htm">opt_prism</A></LI> <LI><A HREF ="opt_screen.htm">opt_screen</A></LI> <LI><A HREF ="opt_elem.htm">opt_elem</A></LI> <LI><A HREF ="opt_grid.htm">opt_grid</A></LI> <LI><A HREF ="opt_slit.htm">opt_slit</A></LI> </UL> <P><HR WIDTH="100%"></P> <P><FONT COLOR="#000000"><FONT SIZE=+1>m-files that call opt_build.m</FONT></FONT></P> <UL> <LI><A HREF ="Contents.htm">Contents</A></LI> <LI><A HREF ="opt_exempel.htm">opt_exempel</A></LI> </UL> <P><HR WIDTH="100%"></P> <P><FONT COLOR="#000000"><FONT SIZE=+1>All the cross references in the source m-code of opt_build.m</FONT></FONT></P> <pre> function opt_elems = opt_build(file) % OPT_ELEMS = OPT_BUILD(FILE) % % OPT_BUILD - Builds optical system specified in FILE % % See also README OPT.EXMPL  % Version: 1.0 % Copyright: Bjorn Gustavsson 20020430  fp = fopen(file,'r');  if fp == -1    error(['Error, could not open file: ',file])  end  curr_line = fgetl(fp); curr_type = strtok(curr_line(10:end)); curr_line = fgetl(fp);  while ~feof(fp) & ~strcmp(curr_type,'end')    opt_args = '';   % Each optical element starts with ``#type''   % Read all parameters specifying that optical   % element.   while ~strcmp(curr_line(1:5),'#type') & ~strcmp(curr_type,'end')      opt_args = str2mat(opt_args,curr_line);     curr_line = fgetl(fp);    end    % Build the current optical element.   switch curr_type    case 'file'     opt_elem = <A HREF ="opt_build.htm">opt_build</A>(deblank(fliplr(deblank(fliplr(opt_args(end,10:end))))));    case 'aperture'     opt_elem = <A HREF ="opt_aperture.htm">opt_aperture</A>(curr_type,opt_args);    case 'grid'     opt_elem = <A HREF ="opt_grid.htm">opt_grid</A>(curr_type,opt_args);    case 'lens'     opt_elem = <A HREF ="opt_lens.htm">opt_lens</A>(curr_type,opt_args);    case 'prism'     opt_elem = <A HREF ="opt_prism.htm">opt_prism</A>(curr_type,opt_args);    case 'screen'     opt_elem = <A HREF ="opt_screen.htm">opt_screen</A>(curr_type,opt_args);    case 'slit'     opt_elem = <A HREF ="opt_slit.htm">opt_slit</A>(curr_type,opt_args);    otherwise     opt_elem = <A HREF ="opt_fcn.htm">opt_fcn</A>(curr_type,opt_args);   end   if ~exist('opt_elems','var')      opt_elems = [opt_elem];    else      opt_elems = [opt_elems opt_elem];    end   curr_type = strtok(curr_line(10:end));   curr_line = fgetl(fp);  end  fclose(fp); </pre> <P><HR WIDTH="100%"></P> <P><I><FONT COLOR="#0000FF"><FONT SIZE=+1>Written by  B. Gustavsson 13:27 29/1 2003 <IMG SRC = "file:/home/bjorn/matlab/Local/Tools/htmltool/gifs/copyright.gif" ></FONT></FONT></I></P> <P><I><FONT COLOR="#0000FF"><FONT SIZE=+1>E-mail:</B><A HREF = "mailto:bjorn@irf.se">bjorn@irf.se</A></H4></FONT></FONT></I></P> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -