From octave-sources-request at bevo dot che dot wisc dot edu Mon Jan 27 14:10:33 2003 Subject: kelv2fahr.m From: Stefan Burger To: octave-sources at bevo dot che dot wisc dot edu Date: Mon, 27 Jan 2003 07:44:40 -0600 --------------Boundary-00=_OVKDMHGTPP0POVZQ7MTA Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable --------------Boundary-00=_OVKDMHGTPP0POVZQ7MTA Content-Type: text/plain; charset="us-ascii"; name="kelv2fahr.m" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kelv2fahr.m" ## Copyright (C) 2003 Stefan Burger ## ## This file is part of Octave. ## ## Octave is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by the ## Free Software Foundation; either version 2, or (at your option) any ## later version. ## ## Octave is distributed in the hope that it will be useful, but WITHOUT ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## for more details. ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, write to the Free ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. ## -*- texinfo -*- ## at deftypefn {Function File} {} kelv2fahr (@var{temp_k}) ## Converts a temperature in kelvin at var{temp_k} to degrees fahrenheit. ## Input can be either a scalar, a vector or a matrix. ## Conversion is done elementwise on the input. The returned value is ## of the same size as the input. ## at end deftypefn ## at seealso{fahr2cels, cels2kelv and cels2fahr} ## Author: Stefan Burger ## Description: converts temperatures kelvin to fahrenheit. function temp_c = kelv2cels (temp_k) if (nargin != 1) usage("kelv2cels (temp_k)"); endif temp_f = (temp_k - 273.15)*1.8+32; endfunction --------------Boundary-00=_OVKDMHGTPP0POVZQ7MTA--