Chinese remainder theorem
Chinese Remainder Theorem
Find a number that has a remainder of
2 when divided by
9, a remainder of
3 when divided by
10, and a remainder of
6 when divided by
x = crt([2 3 6],[9 10 11])
x = 83
mod function to verify the result.
ver = mod(x,[9 10 11])
ver = 1×3 2 3 6
Staggered PRF Radar
In a staggered pulse repetition frequency (PRF) radar system, the first PRF corresponds to
70 range bins and the second PRF corresponds to
85 range bins. The target is detected at bin
47 for the first PRF and bin
12 for the second PRF. Assuming each range bin is
50 meters, compute the target range from these two measurements.
idx = crt([47 12],[70 85]); r = 50*idx
r = 30350
res — Remainder array
row vector of nonnegative integers
Remainder array, specified as a row vector of nonnegative integers.
must have the same number of elements as
x — Congruent integer
Congruent integer, returned as a scalar.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Introduced in R2021a