# How Do I Create/Plot Array of Calculated Values

Hi All,

First time user of SageMath here. Just trying to find out how to do things.

I wish to calculate the components of a rotating force of an object rotating around a fixed axis. The basic formula is $$mrw^2\cos\theta,$$ where $m$, $r$, $w$ are known values and $\theta$ is a simple angle from 0 to 360 degree, i.e. 1 revolution.

In a spreadsheet I would just have a column with values of $\theta$ (e.g. 0,5,10,15,...,350,355,360) and then in the next column I would have $mrw^2\cos \theta$, copy it down and then I could plot XY ($\theta$ vs $mrw^2$).

In a programmatic way, I would do something like

- create an array, - for x = 0 to 360 in increments of 5: array(x) = m*r*w^2*cos(x)

You see how I'm going. How do I accomplish this in Sagemath? It's just about learning the syntax methinks, as I know what I want to achieve, it's just how.

Love the look of Sagemath, would really like to use it a lot.

Thanks in advance.