How to plot a trianlge if its coordinates are not given?

How do I plot a triangle, as shown in the attached image, with the help of data in attached m file.

8 Comments

If you have the 3D coordinates, you can simply use plot3
No, I don't have its coordinates.
What information is given? Just by looking into the m file...we cannot find out what is the information. Is the information in m file follows the one with figure?
What I meant is that from these parameters (all those angles and heights) you should be able to mathematically figure out the coordinates, and once you have those, plotting is trivial. I think it is easier to do this algebra with pen and paper instead of Matlab.
@ KSSV
The following parameters are given:
- Horizontal Angle (alpha) - Horizontal Angle (beta) - gamma
- Vertical Angle A (theta A) - Vertical Angle B (theta B)
- Distance from A to B - Distance from B to P - Distance from A to P
- Height of Intrument A (HI_A) - Height of Intrument A (HI_B)
- Height from p to q (ha) - hb
- Total height A = ha + HI_A - Total height B = hb + HI_B
@ Rik Wisselink
Yes, given parameters are angles, heights, and distance.
Details of things I am trying to code up are shown in figures
Again, although you might be able to solve this in Matlab, I think it is easier to find out the coordinates you want to plot and then let Matlab do the plotting. I don't really see how this is a Matlab question, unless you insist on determining the coordinates in Matlab, for which I have seen no indication.
You need to answer a very important question: what is it exactly you want to do? Plot a triangle? Algebraically determine corner coordinates? Something entirely different?

Answers (0)

This question is closed.

Asked:

on 31 Aug 2017

Closed:

on 20 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!