-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcanshu_1.m
53 lines (38 loc) · 860 Bytes
/
canshu_1.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
clear all;close all;clc
%load IGRF13g
%load IGRF13h
%load R20.mat
%load g_lang_18.mat
%load h_lang_18.mat
%load JupShig.mat
%load JupShih.mat
%load GanyPlag.mat
%load GanyPlah.mat
%load Satdoug.mat
%load Satdouh.mat
%load UraHolg.mat
%load UraHolh.mat
load NeptHolg.mat
load NeptHolh.mat
g=g1;
h=h1;
%a=6371*10^3;
%a=1737.4*10^3;
%a=3393.5*10^3;
%a=71492*10^3;
%a=2631.2*10^3;
%a=60268*10^3;
%a=25559*10^3;
a=24764*10^3;
r=a;
DM(1)=4*pi/(4*pi*10^-7)*a^3*((g(2,2)*10^-9).^2+(g(1,2)*10^-9).^2+(h(2,2)*10^-9).^2).^0.5
for n=1:length(g)-1
g2=(g).^2;
h2=(h).^2;
R1(n,1)=(n+1)* (a/r).^(2*n+4) *(sum(g2(:,n+1))+sum(h2(:,n+1)));
end
DP(1)=R1(1,1);
% NDP(k)=sum(R1(2:end,k));
ZP(1)=sum(R1(1:end,1));
tD= acos( g(1,2)/(g(1,2)^2+g(2,2)^2+h(2,2)^2)^0.5 ) /pi*180
DP/ZP