# move

## Syntax

## Description

`[`

returns the current positions, `bpos`

,`bvel`

,`bax`

] = move(`bicyclist`

,`T`

,`angh`

)`bpos`

, and current velocities,
`bvel`

, of the scatterers and the current orientation axes,
`bax`

, of the bicyclist. The positions, velocities, and axes are then
updated for the next time interval `T`

. `angh`

specifies the heading angle of the bicyclist.

## Examples

### Display Bicyclist Scatterer Positions

Plot the positions of all bicyclist scatterers. Assume there are 15 spokes per wheel.

Create a `backscatterBicyclist`

object for a radar system operating at 77 GHz and having a bandwidth of 300 MHz. The sampling rate is twice the bandwidth. The bicyclist is initially 5 meters away from the radar.

bw = 300e6; fs = 2*bw; fc = 77e9; rpos = [0;0;0]; bpos = [5;0;0]; bicyclist = backscatterBicyclist( ... 'OperatingFrequency',fc,'NumWheelSpokes',15, ... 'InitialPosition',bpos);

Obtain the initial position of the scatterers and advance the motion by 1 second.

[bpos,bvel,bax] = move(bicyclist,1,0);

Obtain the number of scatterers and the indices of the wheel scatterers.

N = getNumScatterers(bicyclist); Nsw = (N-114+1)/2; idxfrontwheel = (114:(114 + Nsw - 1)); idxrearwheel = (114 + Nsw):N;

Plot the locations of the scatterers.

plot3(bpos(1,1:90),bpos(2,1:90),bpos(3,1:90), ... 'LineStyle','none','Color',[0.5,0,0],'Marker','.') axis equal hold on plot3(bpos(1,91:99),bpos(2,91:99),bpos(3,91:99), ... 'LineStyle','none','Color',[0,0,0.7],'Marker','.') plot3(bpos(1,100:113),bpos(2,100:113),bpos(3,100:113), ... 'LineStyle','none','Color',[0,0,0],'Marker','.') plot3(bpos(1,idxfrontwheel),bpos(2,idxfrontwheel),bpos(3,idxfrontwheel), ... 'LineStyle','none','Color',[0,0.5,0],'Marker','.') plot3(bpos(1,idxrearwheel),bpos(2,idxrearwheel),bpos(3,idxrearwheel), ... 'LineStyle','none','Color',[0.5,0.5,0.5],'Marker','.') hold off legend('Frame and rider','Pedals','Rider legs','Front wheel','Rear wheel')

### Model Bicyclist Moving along Arc

Display an animation of a bicyclist riding in a quarter circle. Use the default property values of the `backscatterBicyclist`

object. The motion is updated at 30 millisecond intervals for 500 steps.

dt = 0.03; M = 500; angstep = 90/M; bicycle = backscatterBicyclist; for m = 1:M [bpos,bvel,bang] = move(bicycle,dt,angstep*m); plot(bicycle) end

## Input Arguments

`bicyclist`

— Bicyclist target

`backscatterBicyclist`

object

Bicyclist, specified as a `backscatterBicyclist`

object.

`T`

— Duration of next motion interval

scalar

Duration of next motion interval, specified as a positive scalar. The scatterer positions and velocities and bicyclist orientation are updated over this time duration. Units are in seconds.

**Example: **`0.75`

**Data Types: **`double`

`angh`

— Bicyclist heading

`0.0`

| scalar

Heading of the bicyclist, specified as a scalar. Heading is measured in the
*xy*-plane from the *x*-axis towards the
*y*-axis. Units are in degrees.

**Example: **`-34`

**Data Types: **`double`

`speed`

— Bicyclist speed

value `Speed`

property (default) | nonnegative scalar

Bicyclist speed, specified as a nonnegative scalar. The motion model limits the
speed to 60 m/s. Units are in meters per second. Alternatively, you can specify the
bicyclist speed using the `Speed`

property of the
`backscatterBicyclist`

object.

**Example: **`8`

**Data Types: **`double`

`coast`

— Set bicyclist coasting state

value of `Coast`

property (default) | `false`

| `true`

Set bicyclist coasting state, specified as `false`

or
`true`

. If set to `true`

, the bicyclist is not
pedaling, but the wheels are still rotating (freewheeling). If set to
`false`

, the bicyclist is pedaling, and the
`GearTransmissionRatio`

determines the ratio of wheel rotations to
pedal rotations. Alternatively, you can specify the bicyclist coasting state using the
`Coast`

property of the `backscatterBicyclist`

object.

**Data Types: **`logical`

## Output Arguments

`bpos`

— Positions of bicyclist scatterers

real-valued 3-by-*N* matrix

Positions of bicyclist scatterers, returned as a real-valued
3-by-*N* matrix. Each column represents the Cartesian position,
[*x*;*y*;*z*], of one of the
bicyclist scatterers. *N* represents the number of scatterers and can
be obtained using the `getNumScatterers`

object function. Units are in
meters. See Bicycle Scatterer Indices for the column
representing the position of each scatterer.

**Data Types: **`double`

`bvel`

— Velocities of bicyclist scatterers

real-valued 3-by-*N* matrix

Velocities of bicyclist scatterers, returned as a real-valued
3-by-*N* matrix. Each column represents the Cartesian velocity,
[*vx*;*vy*;*vz*], of one of the
bicyclist scatterers. *N* represents the number of scatterers and can
be obtained using the `getNumScatterers`

object function. Units are in
meters per second. See Bicycle Scatterer Indicesfor the column
representing the velocity of each scatterer.

**Data Types: **`double`

`bax`

— Orientation axes of bicyclist

real-valued 3-by-3 matrix

Orientation axes of bicyclist, returned as a real-valued 3-by-3 matrix. Units are dimensionless.

**Data Types: **`double`

## More About

### Bicycle Scatterer Indices

Bicyclist scatterer indices define which columns in the scatterer position or
velocity matrices contain the position and velocity data for a specific scatterer. For
example, column 92 of `bpos`

specifies the 3-D position of one of the
scatterers on a pedal.

The wheel scatterers are equally divided between the wheels. You can determine the total
number of wheel scatterers, *N*, by subtracting 113 from the output of the
`getNumScatterers`

function. The number of scatterers per wheel is
*N*_{sw} = *N*/2.

**Bicyclist Scatterer Indices**

Bicyclist Component | Bicyclist Scatterer Index |
---|---|

Frame and rider | 1 … 90 |

Pedals | 91 … 99 |

Rider legs | 100 … 113 |

Front wheel | 114 … 114 + N_{sw} - 1 |

Rear wheel | 114 + N_{sw} … 114 +
N - 1 |

## Extended Capabilities

### C/C++ Code Generation

Generate C and C++ code using MATLAB® Coder™.

## Version History

**Introduced in R2021a**

## See Also

## 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)