Closed b-macdonald closed 7 years ago
Here's my method:
clear; clf; clc;
birthdate = 26;
birthmonth = 5;
birthyear = 1997;
if birthdate > birthmonth
X1 = birthmonth;
Z1 = birthdate;
Y1 = (X1 + Z1) / 2;
else
X1 = birthdate;
Z1 = birthmonth;
Y1 = (X1 + Z1) / 2;
end
theta = (birthyear - 1985) * 2;
theta = degtorad(theta);
Thank you, I will implement this into the code.
Updated the file of Compiled 2. Thank you.
If you want to make the code workable for other dates of birth, add a little comparison field to check if month > date. If so, some of the X and Z distances have to be changed.