# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# angle

Angle between sites

## Syntax

``[az,el] = angle(site1,site2)``
``[az,el] = angle(site1,site2,path) ``

## Description

example

````[az,el] = angle(site1,site2)`returns the azimuth and elevation angles between site 1 and site 2.```

example

````[az,el] = angle(site1,site2,path) `returns the angles using a specified path type, either Euclidean or geodesic.```

## Examples

collapse all

```tx = txsite('Name','MathWorks','Latitude',42.3001,'Longitude',-71.3504); rx = rxsite('Name','Fenway Park','Latitude',42.3467,'Longitude',-71.0972); ```

Get the azimuth and elevation angles between the sites.

```[az,el] = angle(tx,rx) ```
```az = 14.0142 el = -0.1204 ```

Get the azimuth angle between sites in degrees clockwise from North.

```azFromEast = angle(tx,rx); % Unit: degrees counter-clockwise from East azFromNorth = -azFromEast + 90 % Convert angle to clockwise from North ```
```azFromNorth = 75.9858 ```

```tx = txsite('Name','MathWorks','Latitude',42.3001,'Longitude',-71.3504); rx = rxsite('Name','Fenway Park','Latitude',42.3467,'Longitude',-71.0972); ```

Get the azimuth and elevation angles between the sites.

```[az,el] = angle(tx,rx,'geodesic') ```
```az = 14.0142 el = 0 ```

## Input Arguments

collapse all

Transmitter or receiver site, specified as a `txsite` or `rxsite` object. You can use array inputs to specify multiple sites.

Measurement path type, specified as one of the following:

• `'euclidean'`: Uses the shortest path through space connecting the antenna center positions of the site 1 and site 2.

• `'geodesic'`: Uses the shortest path on the surface of the earth connecting the latitude and longitude locations of site 1 and site 2. This path uses Earth ellipsoid model WGS-84.

Data Types: `char`

## Output Arguments

collapse all

Azimuth angle between site 1 and site 2, returned as M-by-N arrays in degrees. M is the number of sites in sites 2 and N is the number of sites in sites 1. The values range from `-180` to `180`.

Elevation angle between site 1 and site 2, returned as M-by-N arrays in degrees. M is the number of sites in sites 2 and N is the number of sites in sites 1 The values range from `-90` to `90`.

When the path type specified is `'geodesic'`, elevation angle is always zero.