Muhammad - MATLAB Cody - MATLAB Central

Muhammad

33022
Rank
2
Badges
127
Score
1 – 14 of 14

Muhammad submitted Solution 14291624 to Problem 1107. Find max

on 26 Aug 2024

Muhammad submitted Solution 14291623 to Problem 1107. Find max

on 26 Aug 2024

Muhammad submitted a Comment to Problem 6. Select every other element of a vector

Below is my code but it is failing the test 6 and 7. I tried inputting x=randi(100,10,1) and x=primes(20) in the scratchpad and the code works fine, outputing the right answer. There seems to be a problem with the evaluation of the answers. function y = everyOther(x) y = []; for i = 1:2:length(x); y(end+1) = x(i); end

on 26 Aug 2024

Muhammad received Solver badge for Solution 14291498

on 26 Aug 2024

1 – 14 of 14
Go to top of page