photo

MrFish


Active since 2014

Followers: 0   Following: 0

Message

Statistics

MATLAB Answers

1 Question
0 Answers

RANK
293,510
of 301,809

REPUTATION
0

CONTRIBUTIONS
1 Question
0 Answers

ANSWER ACCEPTANCE
0.0%

VOTES RECEIVED
0

RANK
 of 21,414

REPUTATION
N/A

AVERAGE RATING
0.00

CONTRIBUTIONS
0 Files

DOWNLOADS
0

ALL TIME DOWNLOADS
0

RANK

of 176,674

CONTRIBUTIONS
0 Problems
0 Solutions

SCORE
0

NUMBER OF BADGES
0

CONTRIBUTIONS
0 Posts

CONTRIBUTIONS
0 Public Channels

AVERAGE RATING

CONTRIBUTIONS
0 Discussions

AVERAGE NO. OF LIKES

Feeds

View by

Question


Trying to do a Sieve of Eratosthenes question. It's working to an extent where the numbers appear correctly but adds a number after the previous number. For exmaple: 2 then 2, 3, then 2, 3, 5 then 2,3,5,7
n = 101; array = 2:n; ones = []; for i = 1:length(array) if ~ array(i) == 0 for j = i+1: lengt...

12 years ago | 1 answer | 0

1

answer