#! /usr/bin/octave -q # Copyright (c) 2000 Bruce Ravel # Permission is granted to copy, distribute and/or modify this # document under the terms of the GNU Free Documentation License, # Version 1.0 or any later version published by the Free Software # Foundation; with the Invariant Sections being "EXAFS Analysis # Using FEFF and FEFFIT, Part 1: Presentation", "EXAFS Analysis # Using FEFF and FEFFIT, Part 2: Commentary", and all related # analysis examples, with no Front-Cover Texts, and with no # Back-Cover Texts. A copy of the license is included in the # section entitled "GNU Free Documentation License". ## This file (and all files associated with `EXAFS Analysis Using FEFF ## and FEFFIT') are free documentation; you can redistribute it and/or ## modify it under the terms of the GNU Free Documentation License as ## published by the Free Software Foundation; either version 1, or (at ## your option) any later version. ## You should have received a copy of the GNU Free Documentation License ## along with `EXAFS Analysis Using FEFF and FEFFIT'; see the file ## COPYING. If not, write to the Free Software Foundation, 675 ## Massachusettes Ave, Cambridge, MA 02139, USA. ## Permission is granted to make and distribute verbatim copies of this ## manual provided the copyright notice and this permission notice are ## preserved on all copies. ## Permission is granted to copy and distribute modified versions of this ## manual under the conditions for verbatim copying, provided that the ## entire resulting derived work is distributed under the terms of a ## permission notice identical to this one. ## Permission is granted to copy and distribute translations of this ## manual into another language, under the above conditions for modified ## versions, except that this permission notice may be stated in a ## translation approved by the author. global halfpath = 3.9317; global angled = 10; function y = y (answer) global angled halfpath angle = angled*pi/180; y(1) = atan2(answer(2),answer(1)) - angle; y(2) = (1 + 1/cos(angle)) * answer(1) - halfpath; endfunction start=[halfpath; .3] [answer, info] = fsolve ("y", start) Tix = 2*answer(1)