Question: Write and test a Matlab function that accepts two three-component vectors as input and returns a three-component vector containing the cross product of the two

 Write and test a Matlab function that accepts two three-component vectors

Write and test a Matlab function that accepts two three-component vectors as input and returns a three-component vector containing the cross product of the two input vectors. You must write the code that calculates each element of the resultant vector, do not use the built- in cross function. Test to make sure that the input vectors have three (and only three - use the length or size function) components. The first line of a function must be function name of file_or_function If you are passing variables into a function in order for it to run, the form of the first line is function name_of file_or_function(input1, input2, input3) If you also want to get output from the function, you must use function output = name of file_or_function(input)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!