вектор

How to add two different-sized vectors in R

Let's say there are vectors: a <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) b <- c(1, 2, 3, 4) How to add all the elements of a ... yclically, so that the output is this result: 2, 4, 6, 8, 6, 8, 10, 12, 10, 12 If you can use slices, then it would be great

How to calculate the lengths of the basis vectors?

Hello everyone How to find the length of the basis vectors in the affine coordinate system? It is known that there are point ... the vertex C and has the legs |CA|=2, |CB|=3. Determine the lengths of the basis vectors {e1,e2} and the angles between them.

Rotate a vector around another one

I'm writing a simple game with graphics(the ball bounces off the window borders and lines, which the user builds himself). I ... rly). I would be glad if someone could help me find the answer to this question. I have been suffering for more than a week(

Gradient on part of an object in illustrator cc2018

I have a circle with a gradient, I need to cut it in half so that the center of the gradient does not shift. When you try to ... top of the white circle rectangle and contour processing Such a semicircle with such a gradient in the end you need to get

Where does the "garbage" in the vector come from?

Good time of day. I need to convert a two-dimensional array to a one-dimensional one. I did this in a simple, elementary loop ... vec[counter] := a[i, j]; ListBox1.Items.Add(inttostr(vec[counter])); counter := counter + 1; end; end;

How do I set a vector of functions in Matlab?

You need to specify a vector consisting of functions, for example: g = @(x, y) x.^2 + y.^2; f = @(x, y) x.^3 + y.^4; It i ... the vector. So that you can specify a vector of functions as a parameter in a custom function. How to write this in Matlab?

C++: how to set the dimension of a two-dimensional vector in the class constructor

Class Matrix { int dimension; vector<vector<int>> matrix; public: Matrix(int dimensio ... id it doesn't work matrix.reserve(dimension); for (int i = 0; i < dimension; ++i) { matrix[i].reserve(dimension); }

Plotting Bezier curves SVG

In SVG there is a built-in function for constructing Bezier curves of the 2nd and 3rd degree, i.e. only on three and four poi ... one large one. How do I do this? Preferably with a ready-made code. P.S. I'm writing vector drawing for academic purposes

Plot a vector of a given length from a given point in a certain direction

Please point to the correct course of thought about the problem (see the picture).): - There is a Cam camera, it rotates ar ... t led to anything good. If possible, I want to solve the problem without matrices and trigonometry, for performance reasons.

Find a point on a circle knowing the coordinates of the center of the circle, the coordinates of the second point and the radius

There is a circle, knowing the coordinates of the center and the radius to find the point on the circle closest to the second ... nts)) Almost what you need, but there is a dependence on the distance of the second point from the center of the circle