I presume that you're trying to do somethign similar to the Sieve of Erastosthenes alrogithm and find prime numbers in the given range. You may check out the following File Exchange submission implementing the same:https://www.mathworks.com/matlabcentral/fileexchange/73941-erathostenes
Please note that File Exchange submissions are shared by the MATLAB user community and are not official Mathworks products (they are not written or tested by Mathworks itself).
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.
1 Comment
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/718280-please-write-the-c-code-below-in-matlab#comment_1266320
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/718280-please-write-the-c-code-below-in-matlab#comment_1266320
Sign in to comment.