You have two vectors , determine the angle between these two vectors
u = [0 0 1];
v = [1 0 0];
The angle in degrees between u and v is 90.
It would be good to have a more challenging test suite - see the guidelines for problems. Some solvers write code that is just a lookup table for the test cases, and having only one case makes it trivial to do this.
Also, your test should not use string comparison to evaluate what is a purely numerical computation. It would be better if you subtracted the correct answer from the proposed answer, and then compared the absolute value to a am all threshold, such as 1e-6.
Thnaks for your comments. It was my first or second problem sent to CODY. I didn't catch all the tricks to make strong test cases yet.
I have rescored the problem after adding more robust test suites.
only one test case runs, others are not working
Exploits Cody's size calculation algorithm. Use assessFunctionAbsence to thwart (see also Problem 44521).
cool I have learnt a new MATLAB function
This solution requires Neural Network Toolbox
Sorry for cheating, but you made it too easy...
Back to basics 2 - Function Path
Make a random, non-repeating vector.
Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Remove the two elements next to NaN value
Cody Computer Part 1 - Guess the system font used by uipanel
Make a logical diamond using GALLERY function
Cody Computer Part 6 - Get license number zero!
Create a vector whose elements depend on the previous element
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office