0

Hello People Please what is a Vector in Programing

13th Jul 2020, 10:00 PM
Ultra WALKER
Ultra WALKER - avatar
4 Antworten
0
Think vector as an Arrow. It is a mathematical concept with Direction and Magnitude. Usually represented with something like a = [ 1 2 7] in programming. This is a 3 dimensional vector. Look for linear algebra and numpy to study more about vectors.
13th Jul 2020, 10:26 PM
Ashish
Ashish - avatar
0
Vector are similar to Arrays. But general difference is "Arrays are fixed size. Cannot grow or strink on adding/removal of elements but vector can. Vector size can be increased/decreased. You can add/remove elements completely". So you can think vectors are dynamic array type.. Edit: Ashish I think, you mean array.. Not arrow. Is it?
14th Jul 2020, 9:59 AM
Jayakrishna 🇮🇳
0
Jayakrishna🇮🇳 I mean Arrow. Visually, you see vectors drawn as arrows, which is perfect because an arrow has both a clear direction and a clear magnitude (the length of the arrow). The arrow represents a vector that starts at the arrow’s foot (also called the tail) and ends at the head. Vector is a concept from Physics rather than math or data structure. For example force and velocity. If. Vector has 4 element. It is an arrow in 4 dimensional space. It is so easy to represent mathematically that you can do multidimensional calculations easily. In python vector can represented as Numpy array. If you see Python arrays (list) are also not fixed size.
14th Jul 2020, 9:52 PM
Ashish
Ashish - avatar
0
Ashish ok then fine. [ A visual representation then more clarifies for your model may be..]
15th Jul 2020, 5:15 PM
Jayakrishna 🇮🇳