PlotHyperbola

Versión 1.0.3 (2,42 KB) por Yuxiao Zhai
Plot hyperbolas with configurable parameters.
38 descargas
Actualizado 28 abr 2022

Ver licencia

Description
This function plots hyperbolas with configurable centre position, foci positions, transverse and conjugate axis lengths, limit of major axis, and rotation angle.
Syntax
  • PlotHyperbola plots default hyperbola.
  • PlotHyperbola(Name,Value) specifies parameters using name-value pair arguments.
  • B = PlotHyperbola(___) returns an 4-D array of 2-by-N-by-2. The third dimension reperents the branch number. The second dimension represents the point number on each branch. The first dimension represents the 2-D coordinates of each point.
Input Name-Value Pair Arguments
  • Centre - The centre coordinates of the hyperbola, specified as a 2-D vector. Default [0,0].
  • a - Length of half transverse axis. Default 1.
  • b - Length of half conjugate axis. Default 0.25.
  • MajorAxis - Major axis, 'x' or 'y'. Default 'x'.
  • N - The number of points to plot. Default 1000.
  • Rotation - Counter-clockwise rotation in degrees. Default 0.
  • MajorLim - Limit of major axis. Default 2a, i.e., the length of transverse axis.
  • Plot - Flag indicating whether plot the hyperbola. Default true.
  • axes - Handle of axes to plot on. When not specified, the function will create one
  • Foci - A cell array of foci positions. Each cell contains the 2-D coordinates of a focus. When this parameter is specified, the funciton uses Foci along with a to compute and overwrite Centre, Rotation, and b.
Example
PlotHyperbola
PlotHyperbola('Rotation',30, 'Centre',[2,5],'MajorLim',3,'a',1,'b',1)

Citar como

Yuxiao Zhai (2024). PlotHyperbola (https://www.mathworks.com/matlabcentral/fileexchange/110750-plothyperbola), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2021a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.0.3

Correct mistakes in section Input Name-Value Pair Arguments.

1.0.2

Add a configurable parameter, Foci.

1.0.1

Update summary and description. Add an example of executing the function without input arguments.

1.0.0