How to plot the Gravitational Potential vs Radius of earth plot?
이전 댓글 표시
clc;
clear all;
close all;
format long g;
G=6.6743015*10^-11;
Density=5.510;
M= (4*pi*G*Density)*10^6/3;
R=[10 20 50 100 6370];
%% for the calculation for the gravitational potential
for i =1:length(R)
Gravitational_Potential(:,i) = (M*R(:,i));
i=i+1;
end
figure()
plot(R,Gravitational_Potential);
ylabel('Gravitational Potential');
xlabel('Radius of the Sphere');
title('Gravitational potential vs Radius ');
grid on
I have to plot as curve plot as attached

Hint : - consider you have a function y = x^2. And now you have points x=1,2,4,8, from this you can get the corresponding y values: y=1^2,2^2,4^2,8^2. How do you visualize these values?
Now you have the same with a function V=GM/R, and R=10k,… you got V for all these values, you can visualize your results the same way you did above.
댓글 수: 5
James Tursa
2020년 5월 7일
편집: James Tursa
2020년 5월 7일
It is not clear to me what the actual problem is. Are you supposed to calculate the gravity potential at an interior point of the Earth? That is what your R values would indicate, as that last value looks suspiciously close to the radius of the Earth. Can you clarify this? If true, you shouldn't be using the entire mass of the Earth for your calculations, since that would give you the wrong answer. Or are those R values supposed to be altitude?
vimal kumar chawda
2020년 5월 15일
James Tursa
2020년 5월 15일
편집: James Tursa
2020년 5월 15일
vimal kumar chawda
2020년 5월 17일
James Tursa
2020년 5월 17일
I don't have any code for this, but the equations look farily straightforward so I don't think you should have much trouble writing this.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Earth and Planetary Science에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!