receive
Description
Examples
Received Platform Echo in Radar Scenario
Obtain the signal from two platforms in the a radar scenario using a radar detection generator. Set the random number seed to ensure the repeatability of the data.
s = rng(0);
scenario = radarScenario('UpdateRate',1);
plat1 = platform(scenario);
plat1.Trajectory.Position = [0,0,0];
plat1.Sensors = radarDataGenerator(1);
plat2 = platform(scenario);
plat2.Trajectory.Position = [1000,0,0];
[sig,sensorConfs] = receive(scenario)
sig = 1x1 cell array
{1001x1 double}
sensorConfs = struct with fields:
IsScanDone: 0
MechanicalAngle: 0
ElectronicAngle: [2x1 double]
OriginPosition: [3x1 double]
Orientation: [3x3 double]
ReferenceSensorIndex: 1
Sensor: [1x1 radarTransceiver]
Platform 1 receives echo from platform 2:
rgrid = physconst('lightspeed')*(0:size(sig{1},1)-1)/ ... (2*sensorConfs.Sensor.Waveform.SampleRate)/1e3; plot(rgrid,abs(sig{1}),'r') xlabel('Range (km)') ylabel('Magnitude')
Signal from Two Platforms in Radar Scenario
Obtain the signal from two platforms in a radar scenario using a radarTransceiver. Set the seed in the random number generator to obtain repeatable data.
s = rng(0);
scenario = radarScenario('UpdateRate', 1);
plat1 = platform(scenario);
plat1.Trajectory.Position = [0,0,0];
plat1.Sensors = radarTransceiver;
plat2 = platform(scenario);
plat2.Trajectory.Position = [1000,0,0];
Platform 1 receives echo from platform 2. Obtain the received signal.
[sig,sensorConfs,sensorConfPIDs] = receive(scenario)
sig = 1x1 cell array
{100x2 double}
sensorConfs = struct with fields:
IsScanDone: 0
MechanicalAngle: 0
ElectronicAngle: [2x1 double]
OriginPosition: [3x1 double]
Orientation: [3x3 double]
ReferenceSensorIndex: 0
Sensor: [1x1 radarTransceiver]
sensorConfPIDs = 1
Plot the received signal.
rgrid = physconst('lightspeed')*(0:size(sig{1},1)-1)/ ... (2*sensorConfs.Sensor.Waveform.SampleRate)/1e3; plot(rgrid,abs(sig{1})) xlabel('Range (km)') ylabel('Magnitude')
Return the random number generator to its previous state
rng(s)
Input Arguments
scenario
— Radar scenario
radarScenario
object
Radar scenario, specified as a radarScenario
object.
Output Arguments
sig
— Signal received at radar receivers
cell array
Signal received at the radar receiver, returned as a cell array. Each element of the cell array is the received echoes at each radar.
Complex Number Support: Yes
info
— Radar configurations array
structure array
Radar configurations, returned as a structure array. Each structure contains the following fields:
IsScanDone
–– Whether one period of mechanical scan is doneMechanicalAngle
–– Current antenna pointing angle due to mechanical scanOrigin
–– Radar location in the platform coordinate systemOrientation
–– Radar orientation axes in the platform coordinate system
Data Types: struct
pids
— Platform IDs
column vector of real values
Platform IDs on which radars are mounted, returned as a column vector of real values.
Data Types: double
Version History
Introduced in R2021a
See Also
radarTransceiver
| radarScenario
| detect
| emit
| propagate
| radarEmission
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)