<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://mediawiki.cedeus.cl/mediawiki-1.22.7/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://mediawiki.cedeus.cl/mediawiki-1.22.7/index.php?action=history&amp;feed=atom&amp;title=MatLab_Code_for_Time_Calculation</id>
		<title>MatLab Code for Time Calculation - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://mediawiki.cedeus.cl/mediawiki-1.22.7/index.php?action=history&amp;feed=atom&amp;title=MatLab_Code_for_Time_Calculation"/>
		<link rel="alternate" type="text/html" href="http://mediawiki.cedeus.cl/mediawiki-1.22.7/index.php?title=MatLab_Code_for_Time_Calculation&amp;action=history"/>
		<updated>2026-05-12T05:21:21Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.22.7</generator>

	<entry>
		<id>http://mediawiki.cedeus.cl/mediawiki-1.22.7/index.php?title=MatLab_Code_for_Time_Calculation&amp;diff=119&amp;oldid=prev</id>
		<title>Mentaer: /* Overview */</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.cedeus.cl/mediawiki-1.22.7/index.php?title=MatLab_Code_for_Time_Calculation&amp;diff=119&amp;oldid=prev"/>
				<updated>2011-07-12T17:09:01Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Overview&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 17:09, 12 July 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page contains a sample matlab code used to convert time of the data obtained from bear 272 into seconds&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page contains a sample matlab code used to convert time of the data obtained from bear 272 into seconds&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;''(Return to [[Home Range &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Calculation_Manual&lt;/del&gt;]].)''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;''(Return to [[Home Range &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Calculation Manual&lt;/ins&gt;]].)''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Main==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Main==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mentaer</name></author>	</entry>

	<entry>
		<id>http://mediawiki.cedeus.cl/mediawiki-1.22.7/index.php?title=MatLab_Code_for_Time_Calculation&amp;diff=118&amp;oldid=prev</id>
		<title>Mentaer at 17:08, 12 July 2011</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.cedeus.cl/mediawiki-1.22.7/index.php?title=MatLab_Code_for_Time_Calculation&amp;diff=118&amp;oldid=prev"/>
				<updated>2011-07-12T17:08:44Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 17:08, 12 July 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page contains a sample matlab code used to convert time of the data obtained from bear 272 into seconds&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page contains a sample matlab code used to convert time of the data obtained from bear 272 into seconds&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;''(Return to [[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;HomeRange Calculation&lt;/del&gt;]].)''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;''(Return to [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Home Range Calculation_Manual&lt;/ins&gt;]].)''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Main==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Main==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mentaer</name></author>	</entry>

	<entry>
		<id>http://mediawiki.cedeus.cl/mediawiki-1.22.7/index.php?title=MatLab_Code_for_Time_Calculation&amp;diff=117&amp;oldid=prev</id>
		<title>Mentaer: Created page with '==Overview==  This page contains a sample matlab code used to convert time of the data obtained from bear 272 into seconds  ''(Return to HomeRange Calculation.)''  ==Main==  …'</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.cedeus.cl/mediawiki-1.22.7/index.php?title=MatLab_Code_for_Time_Calculation&amp;diff=117&amp;oldid=prev"/>
				<updated>2011-07-12T17:07:22Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;==Overview==  This page contains a sample matlab code used to convert time of the data obtained from bear 272 into seconds  &amp;#039;&amp;#039;(Return to &lt;a href=&quot;/mediawiki-1.22.7/index.php?title=HomeRange_Calculation&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;HomeRange Calculation (page does not exist)&quot;&gt;HomeRange Calculation&lt;/a&gt;.)&amp;#039;&amp;#039;  ==Main==  …&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
This page contains a sample matlab code used to convert time of the data obtained from bear 272 into seconds&lt;br /&gt;
&lt;br /&gt;
''(Return to [[HomeRange Calculation]].)''&lt;br /&gt;
&lt;br /&gt;
==Main==&lt;br /&gt;
&lt;br /&gt;
 %load in text files&lt;br /&gt;
 data = load('Times.txt');&lt;br /&gt;
 date = load ('Date.txt');&lt;br /&gt;
 % 762 = number of rows of the data. this value will vary from bear to bear&lt;br /&gt;
 seconds = zeros(762,1);&lt;br /&gt;
 seconds2 = zeros(762,1);&lt;br /&gt;
 DayOfYear = zeros (762,1);&lt;br /&gt;
 for i = 1:762&lt;br /&gt;
    seconds (i,1) = ConvertToSec(data(i,1), data(i,2), data(i,3));% this conver hr-min-sec to seconds&lt;br /&gt;
    DayOfYear (i,1) = day(date(i,1), date(i,2), date(i,3));% calculate the number of day of the year&lt;br /&gt;
    seconds2 (i,1) = ConvertMD(DayOfYear (i,1), seconds (i,1));%convert month-day-hr-min-sec into seconds &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==Function:ConverToSec==&lt;br /&gt;
&lt;br /&gt;
 % This function will convert hr-min-secs into secs&lt;br /&gt;
 function result = ConvertToSec(h,m,s)&lt;br /&gt;
 result = s + m * 60 + h * 3600;&lt;br /&gt;
&lt;br /&gt;
==Function:day==&lt;br /&gt;
&lt;br /&gt;
 function NumOfDay = day(Month, Day, Year)&lt;br /&gt;
 %converting month and day into number of days&lt;br /&gt;
  if ((mod(Year, 4) == 0 &amp;amp;&amp;amp; mod(Year,100)~= 0) || mod(Year,400) == 0)&lt;br /&gt;
      %This is leap year. Therefore Feb would have 29 days&lt;br /&gt;
        if Month == 1&lt;br /&gt;
             NumOfDay = Day;&lt;br /&gt;
        end %if month = 1&lt;br /&gt;
        if Month == 2&lt;br /&gt;
             NumOfDay = 31 + Day;&lt;br /&gt;
        end % if month = 2&lt;br /&gt;
        if Month == 3&lt;br /&gt;
             NumOfDay = 31 + 29 + Day;&lt;br /&gt;
        end % if month = 3&lt;br /&gt;
        if Month == 4&lt;br /&gt;
             NumOfDay = 31 * 2 + 29 + Day;&lt;br /&gt;
        end % if month = 4&lt;br /&gt;
        if Month == 5&lt;br /&gt;
            NumOfDay = 31 * 2 + 30 + 29 + Day;&lt;br /&gt;
        end % if month = 5&lt;br /&gt;
        if Month == 6&lt;br /&gt;
            NumOfDay = 31 * 3 + 30 + 29 + Day;&lt;br /&gt;
        end % if month = 6&lt;br /&gt;
        if Month == 7&lt;br /&gt;
            NumOfDay = 31 * 3 + 30 * 2 + 29 + Day;&lt;br /&gt;
        end % if month = 7&lt;br /&gt;
        if Month == 8&lt;br /&gt;
            NumOfDay = 31 * 4 + 30 * 2 + 29 + Day;&lt;br /&gt;
        end % if month = 8&lt;br /&gt;
        if Month == 9&lt;br /&gt;
            NumOfDay = 31 * 5 + 30 * 2 + 29 + Day;&lt;br /&gt;
        end % if month = 9&lt;br /&gt;
        if Month == 10&lt;br /&gt;
            NumOfDay = 31 * 5 + 30 * 3 + 29 + Day;&lt;br /&gt;
        end %if month = 10&lt;br /&gt;
        if Month == 11&lt;br /&gt;
            NumOfDay = 31 * 6 + 30 * 3 + 29 + Day;&lt;br /&gt;
        end %if month = 11&lt;br /&gt;
        if Month == 12&lt;br /&gt;
            NumOfDay = 31 * 6 + 30 * 4 + 29 + Day;&lt;br /&gt;
        end % if month = 12&lt;br /&gt;
  else &lt;br /&gt;
        if Month == 1&lt;br /&gt;
             NumOfDay = Day;&lt;br /&gt;
        end %if month = 1&lt;br /&gt;
        if Month == 2&lt;br /&gt;
             NumOfDay = 31 + Day;&lt;br /&gt;
        end % if month = 2&lt;br /&gt;
        if Month == 3&lt;br /&gt;
             NumOfDay = 31 + 28 + Day;&lt;br /&gt;
        end % if month = 3&lt;br /&gt;
        if Month == 4&lt;br /&gt;
             NumOfDay = 31 * 2 + 28 + Day;&lt;br /&gt;
        end % if month = 4&lt;br /&gt;
        if Month == 5&lt;br /&gt;
            NumOfDay = 31 * 2 + 30 + 28 + Day;&lt;br /&gt;
        end % if month = 5&lt;br /&gt;
        if Month == 6&lt;br /&gt;
            NumOfDay = 31 * 3 + 30 + 28 + Day;&lt;br /&gt;
        end % if month = 6&lt;br /&gt;
        if Month == 7&lt;br /&gt;
            NumOfDay = 31 * 3 + 30 * 2 + 28 + Day;&lt;br /&gt;
        end % if month = 7&lt;br /&gt;
        if Month == 8&lt;br /&gt;
            NumOfDay = 31 * 4 + 30 * 2 + 28 + Day;&lt;br /&gt;
        end % if month = 8&lt;br /&gt;
        if Month == 9&lt;br /&gt;
            NumOfDay = 31 * 5 + 30 * 2 + 28 + Day;&lt;br /&gt;
        end % if month = 9&lt;br /&gt;
        if Month == 10&lt;br /&gt;
            NumOfDay = 31 * 5 + 30 * 3 + 28 + Day;&lt;br /&gt;
        end %if month = 10&lt;br /&gt;
        if Month == 11&lt;br /&gt;
            NumOfDay = 31 * 6 + 30 * 3 + 28 + Day;&lt;br /&gt;
        end %if month = 11&lt;br /&gt;
        if Month == 12&lt;br /&gt;
            NumOfDay = 31 * 6 + 30 * 4 + 28 + Day;&lt;br /&gt;
        end % if month = 12&lt;br /&gt;
  end %if function&lt;br /&gt;
&lt;br /&gt;
==Function:ConvertMD==&lt;br /&gt;
 %This Program will convert date (Month, day) and hour-min-sec into seconds&lt;br /&gt;
 %This is done by first converting month and day into number of days (done in function called day) and&lt;br /&gt;
 %then its converted into seconds, finally its added to the results&lt;br /&gt;
 %produced from the first function&lt;br /&gt;
 function Result2 = ConvertMD(NumOfDay, Result)&lt;br /&gt;
  Result2 = NumOfDay * 24 * 3600 + Result ;&lt;br /&gt;
 end % function&lt;br /&gt;
--[[User:Cqiao|Cqiao]] 21:28, 21 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Mentaer</name></author>	</entry>

	</feed>