Contour plot for 4 different ranges

Hi,
I am new user to MATLAB. I am working on the project where I have plotted equations. I have one equation by which I can calculate the distance of ground station according to transmitter antenna gain. I have plotted those ground stations on the world map. Now I need to create contours around those ground station for 4 different distance ranges. I have calculate those ranges by using FRIIS equation. But I don't understand how to plot contours around those ground stations. Here is my first two codes. I need to add third contour code and combine with these two codes. Do I need to use function? How can I go ahead with this? Please tell me the approach. I can not understand how to approach this problem. Here is my code. Please help me.
%%%%Parameters Setting%%%% clc; LightSpeedC=3e8; Gt=1;% TxAntennaGain in db Gr=1;% RxAntennaGain in db PTx=100;% Power transmitted in watt Pr=-72;% Power received in dBm Pi=3.1415;
%%%%FRIIS Equation%%%% %friis free space propagation model: %n=2 for free space % Pt*Gt*Gr*(wavelenght^2) %Pr=----------------------------- % (4*Pi)^2*d^n freq=input('Enter the frequency'); Wavelenght=LightSpeedC/freq; fprintf('\n value of wavelenght %d\n',Wavelenght) PTxdBm=10*log10(PTx*1000);%Output power in dBm fprintf('\n the value of transmitted power in dbm %d\n',PTxdBm) M=(Wavelenght/(4*Pi)); fprintf('\n Value of M %d\n',M) C=(PTxdBm+Gt+Gr+(20*log10(M))-Pr)/20 %Modified FRIIS eq to get value of d fprintf('\n the value of Pr %d\n',C) d=10^C %Final value of d
%code to plot ground stations function waypoint() filename='user_waypoints.xls'; x=xlsread(filename); A=x(:,2); B=x(:,3); length(A) for i=1:(length(A)-1) lat(i)=A(i+1); long(i)=B(i+1); end % Plot your data: C = load('coast.mat'); plot(C.long,C.lat,'b') hold on plot(long, lat,'r.'); xlabel('Longitude') ylabel('Latitude') legend('borders','ground stations') end
How to combine this and add contours?

1 Comment

I have 600 ground stations to pot contours around. It is listed in xls file as shown in code2.

Sign in to comment.

Answers (0)

Categories

Tags

Asked:

on 7 Jul 2016

Commented:

on 7 Jul 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!