[matlab]斜阶梯式长条引起的重力异常计算
生活随笔
收集整理的這篇文章主要介紹了
[matlab]斜阶梯式长条引起的重力异常计算
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
畫的是《重力學(xué)與固體潮》那本書的斜階梯的重力異常
function [gravity]=draw_gravity_dixing(h1,h2,alpha,xigma,x0,z,direction) %h1=100;%上表面 %h2=200;%下表面 %x0=0;%移動(dòng)原點(diǎn)位置,向右為正 %xigma=3*10^3;%剩余密度 pi=3.1415926535 %alpha=alpha*pi;%傾角%采樣區(qū)間% x=(-5000:50:5000); y=(-5000:50:5000); %z=-100;%測(cè)點(diǎn)高度 G=6.67e-11; [x2,y2]=meshgrid(x,y); %生成網(wǎng)線節(jié)點(diǎn)矩陣 if direction==1gravity=G*xigma*(pi*(h2-h1)+2*h2.*atan(((x2-x0)+h2*cot(alpha))/h2)-2*h1.*atan(((x2-x0)+h1*cot(alpha))/h1)+(x2-x0)*sin(alpha)*sin(alpha).*log(((h2+(x2-x0)*sin(alpha)*cos(alpha)).^2+(x2-x0).^2*sin(alpha)^4)./(((h1+(x2-x0)*sin(alpha)*cos(alpha)).^2+(x2-x0).^2*sin(alpha)^4)))-2.*(x2-x0)*sin(alpha)*cos(alpha).*atan(((x2-x0)*(h2-h1)*sin(alpha)*sin(alpha))./((x2-x0).^2*sin(alpha)^2+(h1+h2).*(x2-x0)*sin(alpha)*cos(alpha)+h1*h2))); end if direction==2gravity=G*xigma*(pi*(h2-h1)+2*h2.*atan(((x0-x2)+h2*cot(alpha))/h2)-2*h1.*atan(((x0-x2)+h1*cot(alpha))/h1)+(x0-x2)*sin(alpha)*sin(alpha).*log(((h2+(x0-x2)*sin(alpha)*cos(alpha)).^2+(x0-x2).^2*sin(alpha)^4)./(((h1+(x0-x2)*sin(alpha)*cos(alpha)).^2+(x0-x2).^2*sin(alpha)^4)))-2.*(x0-x2)*sin(alpha)*cos(alpha).*atan(((x0-x2)*(h2-h1)*sin(alpha)*sin(alpha))./((x0-x2).^2*sin(alpha)^2+(h1+h2).*(x0-x2)*sin(alpha)*cos(alpha)+h1*h2))); end總結(jié)
以上是生活随笔為你收集整理的[matlab]斜阶梯式长条引起的重力异常计算的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: java父包引用_父类引用指向子类对象(
- 下一篇: ajax传递json对象 php,aja