TransWikia.com

Need help creating a function for an angle

Mathematica Asked by Raven on December 20, 2020

Help with creating functions.

I have an assignment I need to do, and the first part is asking me to create a one argument function that has one angle between 0 and 2pi. Ok, I get that. But then it says that the function will create a line from the origin to the point in the unit circle at that angle. I know I’m totally overthinking this. Do I define the function as
f[x_]:={Cos[x], Sin[x]}? Or do I simply need to do something like f[x_]=:x Degree? Or do I need to try something else? I ended up trying it out with cosx, sinx by making a table using the function from 0 to 360 in steps of 3.6 (I need 100 uniform numbers in the interval 0-2pi). This, of course, when plotted just left me with a circle outlined in the x,y coordinates that were defined by the function.
I need an angle (not coordinates) and I need the function to give me a line coming from the origin.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP