Anonymous
Anonymous asked in Cars & TransportationOther - Cars & Transportation · 4 months ago

I need help coding vectors.?

We are supposed to code:

Please enter the x-component of vector a:

Etc.

Given the vectors a = 〈4, 3〉 and b = 〈2, -1〉

Let’s calculate the vector 2a + b:

2a + b = 11.18 @ 26.57°

2a + b = 〈10, 5〉

The unit vector in the direction of 2a+b is

u = 〈10/sqrt(125), 5/sqrt(125)〉

u = 10/sqrt(125)*i + 5/sqrt(125)*j

That is the output of the equation except we ask the user to input the values.

1 Answer

Relevance
  • 4 months ago
    Favorite Answer

    I don't understand your question. Coding in what language? code what?

    I think you are using the word "code" differently... it means writing code for a computer to perform a defined task.

    a = 〈4, 3〉

    x component is 4, y component is 3

    • Log in to reply to the answers
Still have questions? Get answers by asking now.