Advertisement
Guest User

Untitled

a guest
May 24th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.23 KB | None | 0 0
  1. clc
  2. clear all
  3. format compact
  4. %OBLICZANIE WARTOŚCI ŚREDNIEJ SZEROKOŚCI I DŁUGOŚCI GEOGRAFICZNEJ
  5.     %SZEROKOŚĆ
  6.     SZEROKOSC = xlsread('POS.xlsx','F3:F163');
  7.     WSP_SZ_GEO = mean(SZEROKOSC);
  8.     DO_WYKRESU_S = SZEROKOSC/100;
  9.    
  10.     %DŁUGOŚĆ
  11.     DLUGOSC = xlsread('POS.xlsx','H3:H163');
  12.     WSP_DL_GEO = mean(DLUGOSC);
  13.     DO_WYKRESU_D = DLUGOSC/100;
  14.     %WYSOKOŚĆ
  15.     WYSOKOSC = xlsread('POS.xlsx','J3:J163');
  16.     WYS_SREDNIA = mean(WYSOKOSC);
  17.        
  18.     grid on;
  19.      
  20.     geoshow(DO_WYKRESU_S,DO_WYKRESU_D);
  21. % s=sprintf('45%c',char(176));
  22.  
  23.     %DANE DO WYŚWIETLANIA
  24.         LAT = num2str(WSP_SZ_GEO,10);
  25.         LON = num2str(WSP_DL_GEO,10);
  26.         %SZEROKOŚĆ
  27.             stopnie_sz = LAT(1:2);
  28.             minuty_sz = LAT(3:4);
  29.             sekundy_sz = LAT(6:10);
  30.         %DŁUGOŚĆ
  31.             stopnie_dl = LON(1:2);
  32.             minuty_dl = LON(3:4);
  33.             sekundy_dl = LON(6:10);
  34.            
  35.             fprintf('Średnia szerokość geograficzna: %s%c%s.%s'' N\n',stopnie_sz,char(176),minuty_sz,sekundy_sz);
  36.             fprintf('Średnia długość geograficzna: %s%c%s.%s'' E\n',stopnie_dl,char(176),minuty_dl,sekundy_dl);
  37.             fprintf('Średnia wysokość: %.2fm \n',WYS_SREDNIA);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement