📄 ssts__ln_function_singularity_plot.m
字号:
% /*M-FILE Script SSTS__ln_function_singularity_plot MMM SSTSLAB */
% /*==================================================================================================
% Simple Space Tether Simulation Laboratory Toolbox for Matlab 7.x
%
% Copyright 2007 The SxLAB Family - Yi Chen - leo.chen.yi@gmail.com
% ====================================================================================================
%File description:
% ln() is the Natural logarithm function , and in matlab
% LOG Natural logarithm.
% LOG(X) is the natural logarithm of the elements of X.
% Complex results are produced if X is not positive.
%
% this script is to show some singularities of ln()
%
% we take an example as following:
% y1= log( ( R.*cos(theta1)- L + sqrt( R^2 + L^2 - 2*L*R.*cos(theta1) ))./(
% R.*cos(theta1)+ L + sqrt( R^2 + L^2 + 2*L*R.*cos(theta1) )));
%===================================================================================================
% See Also: SSTS__plot_position3d
% SSTS__plot_position
% SSTS__tether_dumbbell_replot
%===================================================================================================
%
%===================================================================================================
%Revision -
%Date Name Description of Change email Location
%30-Nov-2006 Yi Chen Initial version leo.chen.yi@gmail.com Glasgow
%HISTORY$
%==================================================================================================*/
% SSTS__ln_function_singularity_plot Begin
%clear
home
close('all');
clear
cycle1 = 1;
cycle2 = 10;
cycle3 = 100;
cycle4 = 1000;
theta1 = 1 : 0.01 : cycle1*2*pi;
theta2 = 1 : 0.01 : cycle2*2*pi;
theta3 = 1 : 0.01 : cycle3*2*pi;
theta4 = 1 : 0.01 : cycle4*2*pi;
R =6890000;
L =1000;
y1= log( ( R.*cos(theta1)- L + sqrt( R^2 + L^2 - 2*L*R.*cos(theta1) ))./( R.*cos(theta1)+ L + sqrt( R^2 + L^2 + 2*L*R.*cos(theta1) )));
y2= log( ( R.*cos(theta2)- L + sqrt( R^2 + L^2 - 2*L*R.*cos(theta2) ))./( R.*cos(theta2)+ L + sqrt( R^2 + L^2 + 2*L*R.*cos(theta2) )));
y3= log( ( R.*cos(theta3)- L + sqrt( R^2 + L^2 - 2*L*R.*cos(theta3) ))./( R.*cos(theta3)+ L + sqrt( R^2 + L^2 + 2*L*R.*cos(theta3) )));
y4= log( ( R.*cos(theta4)- L + sqrt( R^2 + L^2 - 2*L*R.*cos(theta4) ))./( R.*cos(theta4)+ L + sqrt( R^2 + L^2 + 2*L*R.*cos(theta4) )));
% 2 pi
figure
hold on
grid on
plot(theta1./pi,y1);
xlabel('\theta ( \pi )');
ylabel('Ln( )');
title('0~2\pi');
% 20 pi
figure
hold on
grid on
plot(theta2./pi,y2);
xlabel('\theta ( \pi )');
ylabel('Ln( )');
title('0~20\pi');
% 200 pi
figure
hold on
grid on
plot(theta3./pi,y3);
xlabel('\theta ( \pi )');
ylabel('Ln( )');
title('0~200\pi');
% 2000 pi
figure
hold on
grid on
plot(theta4./pi,y4);
xlabel('\theta ( \pi )');
ylabel('Ln( )');
title('0~2000\pi');
% SSTS__ln_function_singularity_plot End
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -