Professional Documents
Culture Documents
P ( 2, 30, 4)
2.) = + 2
= 2 +
P ( 2, 0, 4)
The initial points given, as well as the scalar components,
should be inputted in array form.
B. Solution
First, a function definition line was inputted with values
of,
, rho, phi and z. Rho, phi and z are the given
are the vector input in
coordinate points, while
CCS. Note that the angle rho must be in degrees. There are
also two outputs given, vector in RCS and vector in CCS.
Second, the given vectors must be converted into
Rectangular Coordinate System because cross product
function requires vector in RCS. The conversion was made
possible using the table:
Table1. Table used for converting RCS and CCS
az
Ax
cos
-sin
Ay
Az
sin
0
cos
0
0
1
, and output
Fig. 2 shows the plot of input vectors,
vector
, in RCS form, in top view 2D plot (x, y). The blue
vector represents, red vector represents
and output
C. Results
Based on the output figure, the algorithm of the code was
correct since the output vector is perpendicular to the input
vectors. It was proven in the Appendix that the three vectors
are perpendicular through dot product.
Fig.1-8 shows the graph of the three perpendicular
vectors. Although it cant be clearly observed in the figures,
when the user generated the figure in the right angle one can
see their perpendicularity.
Fig. 1 shows the plot of input vectors = 1.8660
= 0.3660 + 1.3660
1.2320 + 3
and
, and
output
vector
= 2.866 + 2.964 +
2.9998 in 3D projection with the plots(x, y, z). The blue
vector represents, red vector represents
and output
vector is shown in black.
, and output
Fig. 3 shows the plot of input vectors,
vector
, in RCS form, in front view 2D plot (y, z). The blue
vector represents, red vector represents
and output
, and output
Fig. 4 shows the plot of input vectors,
vector , in RCS form, in right side view 2D plot (x, z). The
blue vector represents, red vector represents
and output
vector is shown in black.
output
,
z). The blue
and output
Fig. 4. Test Value 1 in right side view RCS generated using MATLAB.
output
Fig. 8 shows the plot of input vectors ,
vector
, in RCS form, top view 2D plot (x, z). The blue
vector represents, red vector represents
and output
vector is shown in black
output
Fig. 6 shows the plot of input vectors ,
vector
, in RCS form, top view 2D plot (x, y). The blue
vector represents, red vector represents
and output
vector is shown in black.
gffg
Fig. 8. Test Value 2 in right side view RCS generated using MATLAB
Trial 1
Trial 2
Input
= 2 + 3
= +
P ( 2, 30, 4)
Output
- +4+ 3az
= + 2
= 2 +
P ( 2, 0, 4)
4 -+ 2az
r= ( 0,1,2,3)
= ( 0,30,60,90,120,150,180)
= ( 0,60,120,180,240,300)
= ( 0,60,120,180,240,300)
B. Solution
First, a function definition line was inputted with the
values of (r, ,), wherein r is the set of radius coordinates,
is the set of angle theta coordinates and is the set of
angle phi coordinates.
In this problem, a for-loop statement was used in order to
test values for the three set of components. For statements
loop a specific number of times, and keep track of each
iteration with an incrementing index variable [4]. Loop 1 was
used to test set values of r, loop 2 was used to test set values
of angle theta and loop 3 was used to test set values for angle
phi.
Then, each elements of set r, set theta and set phi must be
converted into their respective RCS coordinates. The
formula used for converting x is x = rsincos; the formula
for converting y is y = rsinsin; the formula converting z is
z= rcos. The scalar components obtained should then be
converted from SCS to RCS. Table 4 was used for
conversion.
In Fig. 10, the top view shows the x and y axes of the
graph, where situated along the y-axis are vectors in a
seemingly straight line. These are the vectors whose Ax are 0
or whose angle phi values are 90 and 270.
Ax
sincos
coscos
-sin
Ay
sinsin
cossin
cos
Az
cos
-sin
Fig. 10. Output vector trial 1 in top view RCS generated using MATLAB
Fig. 11. Output vector trial 1 in front view RCS generated using MATLAB
In Fig. 14, the top view shows the x and y axes of the
graph, where situated along the y-axis are vectors in a
seemingly straight line. These are the vectors whose Ax are
0 or whose angle phi values are 90 and 270
Fig. 12. Output vector trial 1 in right side view RCS generated using MATLAB
Fig. 14. Output vector trial 2 top view RCS generated using MATLAB
= +
.
Trial 1
r= ( 0,1,2,3)
= ( 0,45,90,135,180)
= ( 0,45,90,135,180,225,270,315)
Trial 2
r= ( 0,1,2,3)
= ( 0,30,60,90,120,150,180)
= ( 0,60,120,180,240,300)
Jasmin D. Raca
Limuel Z. Ruiz
V. REFERENCES
Fig. 16. Output vector trial 2 in right side view RCS generated using
MATLAB