📄 drawhyperbola.m
字号:
function drawhyperbola(C, a, b, alpha)%DRAWHYPERBOLA%% drawhyperbola(C, a, b, alpha)% draw hyperbola with center C semiaxis a and b% alpha angle between a and x-axe% s = sin(alpha); c = cos(alpha); Q = [c -s; s c]; fac = (a + b + 2)*log(a + b + 2); theta = [-fac:fac / 50:fac]; u = diag(C)*ones(2,length(theta)) + ... Q*[a*cosh(theta); b*sinh(theta)]; plot(u(1,:),u(2,:)); u = diag(C)*ones(2,length(theta)) + ... Q*[-a*cosh(theta); b*sinh(theta)]; plot(u(1,:),u(2,:)); plot(C(1),C(2),'+');end % drawhyperbola
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -