mjul2str.html 3.33 KB
Newer Older
Geoffrey Cowles's avatar
Geoffrey Cowles committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of mjul2str</title>
  <meta name="keywords" content="mjul2str">
  <meta name="description" content="Convert a modified Julian day to a Matlab datestr style string">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../index.html">Home</a> &gt;  <a href="index.html">utilities</a> &gt; mjul2str.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for utilities&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>-->

<h1>mjul2str
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Convert a modified Julian day to a Matlab datestr style string</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function strout = mjul2str(MJD,noyear) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Convert a modified Julian day to a Matlab datestr style string</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
36
<li><a href="mjul2matlab.html" class="code" title="function [ sdOut ] = mjul2matlab( mjul )">mjul2matlab</a>	MJUL2MATLAB Convert a Modified Julian date to a Matlab Serial Date</li></ul>
Geoffrey Cowles's avatar
Geoffrey Cowles committed
37 38 39 40 41 42 43 44 45 46 47
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
<!-- crossreference -->



<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function strout = mjul2str(MJD,noyear)</a>
0002 <span class="comment">% Convert a modified Julian day to a Matlab datestr style string</span>
0003 
Pierre Cazenave's avatar
Pierre Cazenave committed
48 49 50 51
0004 MJD = double(MJD);
0005 
0006 <a href="mjul2matlab.html" class="code" title="function [ sdOut ] = mjul2matlab( mjul )">mjul2matlab</a> = 678942; <span class="comment">%difference between modified Julian day 0 and Matlab day 0</span>
0007 <span class="keyword">if</span>(~exist(<span class="string">'noyear'</span>))
52
0008 strout = datestr(MJD+<a href="mjul2matlab.html" class="code" title="function [ sdOut ] = mjul2matlab( mjul )">mjul2matlab</a>);
Pierre Cazenave's avatar
Pierre Cazenave committed
53 54 55 56 57
0009 <span class="keyword">else</span>
0010 strout = datestr(MJD+<a href="mjul2matlab.html" class="code" title="function [ sdOut ] = mjul2matlab( mjul )">mjul2matlab</a>);
0011 strout = strout(1:end-5)
0012 <span class="keyword">end</span>;</pre></div>
<hr><address>Generated on Wed 20-Feb-2019 16:06:01 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
Geoffrey Cowles's avatar
Geoffrey Cowles committed
58 59
</body>
</html>