-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyfun Express.m
13 lines (12 loc) · 2.14 KB
/
Myfun Express.m
1
2
3
4
5
6
7
8
9
10
11
12
13
function myfun = myfun_express(theta)
%define the function
global n_x s_x a_x p_x n_y s_y a_y p_y n_z s_z a_z p_z;
myfun(1)=sin(theta(2))*sin(theta(3)) - cos(theta(2))*cos(theta(3)) + n_x*cos(theta(1)) + n_y*sin(theta(1))
myfun(2)=(6582018229284824168619876730229402019930943462534319453394436096*n_z)/6582018229284824168619876730229426698546516034017186921057159217 - cos(theta(2))*sin(theta(3)) - cos(theta(3))*sin(theta(2)) + (403032377821159473656973322630821148176053960704*n_y*cos(theta(1)))/6582018229284824168619876730229426698546516034017186921057159217 - (403032377821159473656973322630821148176053960704*n_x*sin(theta(1)))/6582018229284824168619876730229426698546516034017186921057159217
myfun(3)=(403032377821159473656973322630821148176053960704*n_z)/6582018229284824168619876730229426698546516034017186921057159217 - (6582018229284824168619876730229402019930943462534319453394436096*n_y*cos(theta(1)))/6582018229284824168619876730229426698546516034017186921057159217 + (6582018229284824168619876730229402019930943462534319453394436096*n_x*sin(theta(1)))/6582018229284824168619876730229426698546516034017186921057159217
myfun(4)=0
myfun(5)=cos(theta(2))*sin(theta(3)) + cos(theta(3))*sin(theta(2)) + s_x*cos(theta(1)) + s_y*sin(theta(1))
myfun(6)=(6582018229284824168619876730229402019930943462534319453394436096*s_z)/6582018229284824168619876730229426698546516034017186921057159217 - cos(theta(2))*cos(theta(3)) + sin(theta(2))*sin(theta(3)) + (403032377821159473656973322630821148176053960704*s_y*cos(theta(1)))/6582018229284824168619876730229426698546516034017186921057159217 - (403032377821159473656973322630821148176053960704*s_x*sin(theta(1)))/6582018229284824168619876730229426698546516034017186921057159217
myfun(7)=(403032377821159473656973322630821148176053960704*s_z)/6582018229284824168619876730229426698546516034017186921057159217 - (6582018229284824168619876730229402019930943462534319453394436096*s_y*cos(theta(1)))/6582018229284824168619876730229426698546516034017186921057159217 + (6582018229284824168619876730229402019930943462534319453394436096*s_x*sin(theta(1)))/6582018229284824168619876730229426698546516034017186921057159217
myfun(8)=0
end