summaryrefslogtreecommitdiff
path: root/Functions/days
diff options
context:
space:
mode:
authorChristian Kolset <christian.kolset@gmail.com>2024-12-21 20:11:19 +0100
committerChristian Kolset <christian.kolset@gmail.com>2024-12-21 20:11:19 +0100
commit26f9500d3fe5073788354102d157cc5e7978c740 (patch)
tree3ceeef96fd8e6f693f7012fa8bb5b8efaf9f0b6b /Functions/days
parentd94f8b703beb9c671631f6b065e749b84378ba77 (diff)
Renamed and re-organized files in Scripts/ directory
Diffstat (limited to 'Functions/days')
-rw-r--r--Functions/days/README.md11
-rw-r--r--Functions/days/days.m22
2 files changed, 0 insertions, 33 deletions
diff --git a/Functions/days/README.md b/Functions/days/README.md
deleted file mode 100644
index 8a11db2..0000000
--- a/Functions/days/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-#days.m
-Function to count the total days elapsed in a year according to a given date.
-The syntax of the function is `days(<months>, <days>, <leap>)` where `months` is a integer (1-12). `days` is an integer (1-31) and `leap`
-
-## Input
-months - month number (1-12). Example: `8` represents August.
-days - day number of the month.
-leap - indicates if the year is a leapyear or a regular year. `0` for regular and `1` for leap year.
-
-## Output
-`nd` - number of days elapsed in the year. \ No newline at end of file
diff --git a/Functions/days/days.m b/Functions/days/days.m
deleted file mode 100644
index 87163b7..0000000
--- a/Functions/days/days.m
+++ /dev/null
@@ -1,22 +0,0 @@
-function nd = days(mo, da, leap)
-%days - Counts days elapsed in the year.
-%
-% days(<months>, <days>, <leap>) determines the days elapsed in a year
-% based on the current date. This will include the current day.
-% Months (1-12),
-% Example: August 28, no leap year
-% days(8,28,0)
-
-daysPeM=[0 31 59 90 120 151 181 212 243 273 304 334]; % cummulative days prior each month.
-
-nd = daysPeM(mo) + da;
-
-if leap == 1 & mo >= 3
- nd = nd + 1;
-end
-end
-
-
-% MECH 105: Homework 4 - Part 1
-% Author: Christian Kolset
-% Date: 5.21.21 \ No newline at end of file