changeset 713:632844972d35

[project @ 1994-09-20 18:37:13 by jwe] Initial revision
author jwe
date Tue, 20 Sep 1994 18:38:18 +0000
parents 36ba0576bd1b
children ceccee4d4d87
files scripts/elfun/Makefile.in scripts/elfun/acot.m scripts/elfun/acoth.m scripts/elfun/acsc.m scripts/elfun/acsch.m scripts/elfun/asec.m scripts/elfun/asech.m scripts/elfun/cot.m scripts/elfun/coth.m scripts/elfun/csc.m scripts/elfun/csch.m scripts/elfun/log2.m scripts/elfun/sec.m scripts/elfun/sech.m
diffstat 14 files changed, 217 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/Makefile.in
@@ -0,0 +1,74 @@
+#
+# Makefile for octave's scripts/elfun directory
+#
+# John W. Eaton
+# jwe@che.utexas.edu
+# Department of Chemical Engineering
+# The University of Texas at Austin
+
+TOPDIR = ../..
+
+script_sub_dir = elfun
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+include $(TOPDIR)/Makeconf
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+SOURCES = *.m
+
+DISTFILES = Makefile.in $(SOURCES)
+
+FCN_FILES = $(wildcard $(srcdir)/*.m)
+FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
+
+all:
+.PHONY: all
+
+install: all
+	if test -d $(fcnfiledir)/$(script_sub_dir) ; then true ; \
+	else $(TOPDIR)/mkpath $(fcnfiledir)/$(script_sub_dir) ; fi
+	for f in $(FCN_FILES_NO_DIR) ; do \
+	  rm -f $(fcnfiledir)/$(script_sub_dir)/$$f ; \
+	  $(INSTALL_DATA) $(srcdir)/$$f $(fcnfiledir)/$(script_sub_dir)/$$f ; \
+	done
+.PHONY: install
+
+uninstall:
+	for f in $(FCN_FILES_NO_DIR) ; \
+	  do rm -f $(fcnfiledir)/$(script_sub_dir)/$$f ; \
+	done
+.PHONY: uninstall
+
+clean:
+.PHONY: clean
+
+tags: $(SOURCES)
+	ctags $(SOURCES)
+
+TAGS: $(SOURCES)
+	etags $(SOURCES)
+
+mostlyclean: clean
+.PHONY: mostlyclean
+
+distclean: clean
+	rm -f Makefile
+.PHONY: distclean
+
+realclean: distclean
+	rm -f tags TAGS
+.PHONY: realclean
+
+local-dist:
+	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/elfun
+.PHONY: local-dist
+
+dist:
+	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/elfun
+.PHONY: dist
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/acot.m
@@ -0,0 +1,11 @@
+function w = acot (z)
+
+# acot (z):  compute the inverse cotangent for each element of z.
+
+  if (nargin != 1)
+    error ("usage: acot (z)");
+  endif
+
+  w = atan (1 ./ z);
+
+endfunction
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/acoth.m
@@ -0,0 +1,11 @@
+function w = acoth (z)
+
+# acoth (z):  compute the inverse hyperbolic cotangent for each element of z. 
+
+  if (nargin != 1)
+    error ("usage: acoth (z)");
+  endif
+
+  w = atanh (1 ./ z);
+
+endfunction
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/acsc.m
@@ -0,0 +1,11 @@
+function w = acsc (z)
+  
+# acsc (z):  compute the inverse cosecant for each element of z.
+  
+  if (nargin != 1)
+    error ("usage: acsc (z)");
+  endif
+
+  w = asin (1 ./ z);
+  
+endfunction
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/acsch.m
@@ -0,0 +1,11 @@
+function w = acsch (z)
+  
+# acsch (z):  compute the inverse hyperbolic cosecant for each element of z.
+  
+  if (nargin != 1)
+    error ("usage: acsch (z)");
+  endif
+
+  w = asinh (1 ./ z);
+  
+endfunction
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/asec.m
@@ -0,0 +1,11 @@
+function w = asec (z)
+  
+# asec (z):  compute the inverse secant for each element of z.
+  
+  if (nargin != 1)
+    error ("usage: asec (z)");
+  endif
+
+  w = acos (1 ./ z);
+  
+endfunction
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/asech.m
@@ -0,0 +1,11 @@
+function w = asech (z)
+  
+# asech (z):  compute the inverse hyperbolic secant for each element of z.
+  
+  if (nargin != 1)
+    error ("usage: acosh (z)");
+  endif
+
+  w = acosh (1 ./ z);
+  
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/cot.m
@@ -0,0 +1,11 @@
+function w = cot (z)
+  
+# cot (z):  compute the cotangent for each element of z.
+  
+  if (nargin != 1)
+    error ("usage: cot (z)");
+  endif
+
+  w = 1 ./ tan(z);
+  
+endfunction
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/coth.m
@@ -0,0 +1,11 @@
+function w = coth (z)
+  
+# coth (z):  compute the hyperbolic cotangent for each element of z.
+  
+  if (nargin != 1)
+    error ("usage: coth (z)");
+  endif
+
+  w = 1 ./ tanh(z);
+  
+endfunction
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/csc.m
@@ -0,0 +1,11 @@
+function w = csc (z)
+  
+# csc (z):  compute the cosecant for each element of z.
+  
+  if (nargin != 1)
+    error ("usage: csc (z)");
+  endif
+
+  w = 1 ./ sin(z);
+  
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/csch.m
@@ -0,0 +1,11 @@
+function w = csch (z)
+  
+# csch (z):  compute the hyperbolic cosecant for each element of z.
+  
+  if (nargin != 1)
+    error ("usage: csch (z)");
+  endif
+
+  w = 1 ./ sinh(z);
+  
+endfunction
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/log2.m
@@ -0,0 +1,11 @@
+function w = log2 (z)
+  
+# log2 (z):  compute the logarithm base 2 for each element of z.
+  
+  if (nargin != 1)
+    error ("usage: log2 (z)");
+  endif
+
+  w = log(z) / log(2);
+  
+endfunction
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/sec.m
@@ -0,0 +1,11 @@
+function w = sec (z)
+  
+# sec (z): compute the secant for each element of z.
+
+  if (nargin != 1)
+    error ("usage: sec (z)");
+  endif
+  
+  y = 1 ./ cos(z);
+  
+endfunction
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/scripts/elfun/sech.m
@@ -0,0 +1,11 @@
+function w = sech (z)
+  
+# sech (z):  compute the hyperbolic secant for each element of z.
+  
+  if (nargin != 1)
+    error ("usage: sech (z)");
+  endif
+
+  y = 1 ./ cosh(z);
+  
+endfunction
\ No newline at end of file