Professional Documents
Culture Documents
Function: 'Display' 'Off'
Function: 'Display' 'Off'
2cosQ-6+7cosf1 -9cosf2 =0
2sinQ+7sinf1 -9sinf2 =0
Create the following m file in the editor window and write your equations
in the following form:
w=[(2*(cos(pi*input/180)))-6+(7*cos(output(1)))-(9*cos(output(2)));
(2*sin(pi*input/180))+(7*sin(output(1)))-(9*sin(output(2)))];
End
Note that your m file name must be the same as the function name “position”
To solve this system for any value of Q we can create another m file with the following:
close
clc %this line just clears your command window
i=1;
theta34(:,i)=fsolve(@position,[1 1],options,theta)*180/pi;
i=i+1;
end
plot(the(1,:),theta34(1,:));
hold;
plot(the(1,:),theta34(2,:));
grid;
Note that variable “theta34” in the workspace will have the size of 2 x 361. The first row
contains the first output “phi 1” and the column contains the value of the output as the value
of theta changes from 0 to 360 hence the 361.