PlotHyperbola

版本 1.0.3 (2.4 KB) 作者: Yuxiao Zhai
Plot hyperbolas with configurable parameters.
45.0 次下载
更新时间 2022/4/28

查看许可证

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)

引用格式

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

MATLAB 版本兼容性
创建方式 R2021a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
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