4 lines
97 B
Matlab
4 lines
97 B
Matlab
function f = chineseRemainder(r, m)
|
|
s = prod(m) ./ m;
|
|
[~, t] = gcd(s, m);
|
|
f = s .* t * r';
|