This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
R=2.^[12:22];
N=primes(3329);
N=N(end-10:end);
[R,N]=meshgrid(R,N);
Rp =[ 2925 3089 3171 3212 1606 803 2028 1014 507 1880 940
1316 658 329 1793 2525 2891 3074 1537 2397 2827 3042
1538 769 2014 1007 2133 2696 1348 674 337 1798 899
2256 1128 564 282 141 1706 853 2062 1031 2151 2711
1486 743 2021 2660 1330 665 1982 991 2145 2722 1361
3110 1555 2428 1214 607 1954 977 2139 2720 1360 680
876 438 219 1763 2535 2921 3114 1557 2432 1216 608
2471 2892 1446 723 2018 1009 2161 2737 3025 3169 3241
2328 1164 582 291 1805 2562 1281 2300 1150 575 1947
374 187 1755 2539 2931 3127 3225 3274 1637 2480 1240
2704 1352 676 338 169 1749 2539 2934 1467 2398 1199];
Np =[ 3683 7779 15971 32355 32355 32355 163427 163427 163427 1212003 1212003
1655 1655 1655 18039 50807 116343 247415 247415 771703 1820279 3917431
1933 1933 10125 10125 42893 108429 108429 108429 108429 1157005 1157005
2825 2825 2825 2825 2825 68361 68361 330505 330505 1379081 3476233
1845 1845 10037 26421 26421 26421 157493 157493 681781 1730357 1730357
3859 3859 12051 12051 12051 77587 77587 339731 864019 864019 864019
1085 1085 1085 17469 50237 115773 246845 246845 771133 771133 771133
3055 7151 7151 7151 39919 39919 170991 433135 957423 2005999 4103151
2873 2873 2873 2873 35641 101177 101177 363321 363321 363321 2460473
461 461 8653 25037 57805 123341 254413 516557 516557 1565133 1565133
3327 3327 3327 3327 3327 68863 199935 462079 462079 1510655 1510655];
[rp,np]=bezout(R,N);
assert(isequal(rp,Rp))
assert(isequal(np,Np))
|
Renaming a field in a structure array
732 Solvers
819 Solvers
101 Solvers
Find Index of maximum Value and maximum Value of a vector
145 Solvers
82 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!