📄 opt_fcn.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_fcn.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> [opt1] = opt_fcn(opt_type,opt_args) </FONT></FONT></P> <P><HR WIDTH="100%"></P> <P><FONT COLOR="#000000"><FONT SIZE=+2>Function comments</FONT></FONT></P> <pre> % % OPT_FCN optical surface with general shape % OPT_TYPE should be the function name, opt_args % should be a string matrix, see README_OPT for specification. % The specification and handling of OPT_ARGS are left to mercy of % the person writing the OPT_FCN. See the function to call for % details. A requirement on the optical funciton is that it should % return 0 when called with OPT_FCN(R,'s',optargs) when R is a % point on the surface and growing positive and negative values % when R is not on the surface. When called with % OPT_FCN(R,'n',opt_args) the function should return the surface % normal. % % See also OPT_LENS, OPT_SCREEN, OPT_GRID, OPT_PRISM, OPT_SLIT </pre> <P><HR WIDTH="100%"></P> <P><FONT COLOR="#000000"><FONT SIZE=+1>m-files called by opt_fcn.m</FONT></FONT></P> <UL> <LI><A HREF ="opt_findstr.htm">opt_findstr</A></LI> <LI><A HREF ="point_on_line.htm">point_on_line</A></LI> <LI><A HREF ="opt_elem.htm">opt_elem</A></LI> </UL> <P><HR WIDTH="100%"></P> <P><FONT COLOR="#000000"><FONT SIZE=+1>m-files that call opt_fcn.m</FONT></FONT></P> <UL> <LI><A HREF ="opt_build.htm">opt_build</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_fcn.m</FONT></FONT></P> <pre> function [opt1] = opt_fcn(opt_type,opt_args) % [opt1] = opt_fcn(opt_type,opt_args) % % OPT_FCN optical surface with general shape % OPT_TYPE should be the function name, opt_args % should be a string matrix, see README_OPT for specification. % The specification and handling of OPT_ARGS are left to mercy of % the person writing the OPT_FCN. See the function to call for % details. A requirement on the optical funciton is that it should % return 0 when called with OPT_FCN(R,'s',optargs) when R is a % point on the surface and growing positive and negative values % when R is not on the surface. When called with % OPT_FCN(R,'n',opt_args) the function should return the surface % normal. % % See also OPT_LENS, OPT_SCREEN, OPT_GRID, OPT_PRISM, OPT_SLIT % Version: 1.0 % Copyright: Bjorn Gustavsson 20020430 if nargin ~= 2, help opt_fcn; ok = 0; return; end; %opt_type opt1 = <A HREF ="opt_elem.htm">opt_elem</A>(opt_type); opt1.fcn1 = inline([opt1.type,'(<A HREF ="point_on_line.htm">point_on_line</A>(r_0,e_l,l),s_or_n,arglist)^2'],'l','r_0','e_l','s_or_n','arglist'); opt1.fcn2 = inline([opt1.type,'(r_int,s_or_n,arglist)'],'r_int','s_or_n','arglist'); ii = <A HREF ="opt_findstr.htm">opt_findstr</A>(opt_args,'glass'); opt1.glass = strtok(opt_args(ii,12:end)); opt_args = opt_args([1:ii-1 ii+1:end],:); opt1.arglist = struct; for ii = 1:size(opt_args,1) if ~isempty(deblank(opt_args(ii,:))) val = str2num(opt_args(ii,13:end)); if isempty(val) val = fliplr(deblank(fliplr(deblank(opt_args(ii,13:end))))); end opt1.arglist = setfield(opt1.arglist,deblank(opt_args(ii,1:11)),val); end end </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 + -