Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Alfonso Nieto-Castanon

View profile information

Personal Profile

http://www.alfnie.com

1Rank
17Badges
20240Score

Alfonso Nieto-Castanon submitted Solution 567334 to Problem 2883. prime test

6 hours and 44 minutes ago

Alfonso Nieto-Castanon submitted a Comment to Solution 567313

very nice expansion using struct!

7 hours and 59 minutes ago

Alfonso Nieto-Castanon liked Solution 567313

8 hours and 1 minute ago

Alfonso Nieto-Castanon submitted a Comment to Problem 2692. design a magic matrix without using the command magic.

The testsuite does not appear to be changed at all. Click on 'Edit' to edit this problem, then go to textbox titled 'Test Suite', add the brackets there to the "y_correct = ..." line, then click on the 'Save' button. Ideally you would also try out your own solution to this problem (in the textbox titled 'Reference Solution') and click on the 'Test reference solution' button to make sure that everything is working as expected...

12 hours and 17 minutes ago

Alfonso Nieto-Castanon submitted a Comment to Solution 566636

this would count as a hack, but just because it is original a hint (if I am interpreting correctly): right idea wrong slash

12 hours and 44 minutes ago

Alfonso Nieto-Castanon liked Solution 565464

on 26 Jan 2015 at 16:28

Alfonso Nieto-Castanon liked Solution 565409

on 26 Jan 2015 at 16:05

Alfonso Nieto-Castanon submitted a Comment to Problem 2873. feeling VERY lucky?

edit: Sylvain solution here shows that I was wrong above, and the random seeds *are* reinitialized before running the testsuite, only that not to their 'default' state but rather likely by using rng('shuffle') (I have to look through Cody code to see if I can confirm this but that would be consistent with the observed behavior)

on 26 Jan 2015 at 15:59

Alfonso Nieto-Castanon submitted a Comment to Solution 565376

ha, that would also work :)

on 26 Jan 2015 at 15:53

Alfonso Nieto-Castanon liked Solution 565376

on 26 Jan 2015 at 15:52

Alfonso Nieto-Castanon submitted Solution 564850 to Problem 2482. Card Game

on 25 Jan 2015 at 1:37

Alfonso Nieto-Castanon submitted a Comment to Problem 2873. feeling VERY lucky?

Hi Jean-Marie, thanks, it is a pleasure to be back! In my opinion that does not work simply because the Matlab session where your solution is being evaluated is not a "clean" (just started) matlab session. Rather the testsuite will be evaluated by one of several Matlab servers available at any given timepoint, and while the variable space is cleared, and the directory structure is deleted before each evaluation there are many other properties (like the state of random streams, functions in memory, etc.) which are not reinitialized and will be influenced by the particular server's history of evaluated solutions (e.g. this is what allows hacks like freepass to work)

on 25 Jan 2015 at 0:48

Alfonso Nieto-Castanon submitted a Comment to Problem 2692. design a magic matrix without using the command magic.

Hi Anupam, could you please correct this testsuite? (just change the line that reads "y_correct = 16 3 2 13;5 10 11 8;9 6 7 12;4 15 14 1" to read instead "y_correct = [16 3 2 13;5 10 11 8;9 6 7 12;4 15 14 1]")

on 24 Jan 2015 at 2:52

Alfonso Nieto-Castanon submitted a Comment to Problem 2871. Help the Patriots get to the Super Bowl

somebody's Matlab license is about to mysteriously disappear...

on 23 Jan 2015 at 20:19

Alfonso Nieto-Castanon submitted a Comment to Problem 2856. Matlab Basics - Create a row vector

(not to mention that this particular testsuite does not even test for anything at all)

on 23 Jan 2015 at 15:15

Alfonso Nieto-Castanon submitted a Comment to Problem 2856. Matlab Basics - Create a row vector

While I understand that experimenting with creating problems is half the fun of Cody this is a somewhat extreme example of a repetitive problem that seems unnecessary, so yes, I agree with Jean-Marie here that perhaps some form of user-based curation like that in Answers or minimum user-requirements for creating problems might help

on 23 Jan 2015 at 15:03

Alfonso Nieto-Castanon submitted a Comment to Problem 2735. Binary Neighbourhood

but I liked your fix for the ans trick, I wish that was part of the standard cody scoring!

on 23 Jan 2015 at 14:36

Alfonso Nieto-Castanon submitted a Comment to Solution 563738

unless I am misunderstanding, y_correct should be 2 for test #2 (e.g. path 1-2-1)

on 23 Jan 2015 at 14:27