Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
how can i create a circle with a radius leading to a point p with a tangent on the point p?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I need a script to create a circle from a fixed point defined 𝑥 = 𝑟 cos 𝜃 + 𝑥0 𝑦 = 𝑟 sin 𝜃 + 𝑦0 with a radius plotted between (𝑥0, 𝑦0 ) and (𝑥𝑃, 𝑦𝑃 ) and a tangent line (𝑥𝑡 , 𝑦𝑡) are defined as follows: When 𝑦𝑃 ≠ 𝑦0 𝑥𝑃 − 2 ≤ 𝑥𝑡 ≤ 𝑥𝑃 + 2 𝑦𝑡 = 𝑚𝑡 (𝑥𝑡 − 𝑥𝑃 ) + 𝑦𝑃, When 𝑦𝑃 = 𝑦0 𝑥𝑡 = 𝑥𝑃 𝑦𝑃 − 5 ≤ 𝑦𝑡 ≤ 𝑦𝑃 + 5.
The MATLAB script must include the following: • User input for o The radius of the circle o The coordinates of the centre of the circle o The coordinates of the point 𝑃 • All calculations, including the calculation for the gradient of the tangent • The commands to: o Create a single figure containing all three lines/curves o Create a legend on the figure o Label the figure axes o Choose appropriate limits for the axes to ensure the circle does not touch the axes at any point o Set the aspect ratio of the figure to be 1:1 (use the MATLAB help to find the correct command to do this) • Comments describing the code
0 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!