MATLAB: How to find the angle between 2 points MATLAB I want to find the angle just like in this image in degree. Or I can't find with just 2 points ? Best Answer atan2d(y2-y1,x2-x1); Related SolutionsMATLAB: Calculate the angle between a line (between two points) and the perpendicular line Maybe you mean:angle = atand(b(1,:) - a(1,:)) - (b(2,:) - a(2,:)))% ^???without a loop. But here the number of parentheses does not match. I'm not sure which problem you want to solve. MATLAB: Transform x,y coordinate to angle I would think that you could use atan2 or atan2d (if you want result in degrees) for this.For examplex1 = [2;1] % first pointx2 = [-1;-1] % second pointdelta = x2 - x1 % vector that points from x1 to x2heading = atan2d(delta(2),delta(1)) which results inheading = -146.3099 Related QuestionHow to connect points with line segmentsHow to find the angle between two vectors, including directional informationHow to get distance & angle of a point from the center of a minor axis ?How to calculate the angle between two rays (or two vectors)Random points between lines
Best Answer