Isprime optimus [FAST]
Version 1.1 (1.23 KB) by
Nicolas Douillet
Primality test using isprime Matlab(r) stock function, but ~60% faster for vectors.
Once downloaded, typewrite 'help isprime_optimus' in Matlab console for support.
To benefit from the file documentation attached, be sure to download the files, not to just copy and paste them.
Input
u : a vector of integers sorted in ascending order.
Output
is_prime : logical vector, result of u primality test. size(is_prime) = size(u).
Please don't forget to rate if this code helped you. Thanks ! ;-)
Cite As
Nicolas Douillet (2024). Isprime optimus [FAST] (https://github.com/NicolasDouillet/isprime_optimus/releases/tag/v1.1), GitHub. Retrieved .
MATLAB Release Compatibility
Created with
R2019b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.1 |
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.