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

Learn moreOpportunities for recent engineering grads.

Apply Today1Rank

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 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 submitted Solution 563737 to Problem 2458. Graph Algorithms - 1 : Length of the largest closed path

16 hours and 41 minutes ago

Alfonso Nieto-Castanon submitted Solution 566357 to Problem 2697. Probability of winning single-elimination tournament

on 27 Jan 2015 at 6:07

Alfonso Nieto-Castanon submitted Solution 566320 to Problem 2647. Find the maximal cliques in an undirected graph

on 27 Jan 2015 at 3:58

Alfonso Nieto-Castanon submitted Solution 566318 to Problem 2647. Find the maximal cliques in an undirected graph

on 27 Jan 2015 at 3:55

Alfonso Nieto-Castanon submitted Solution 566316 to Problem 2646. Determine the number of maximal cliques in an undirected graph

on 27 Jan 2015 at 3:48

Alfonso Nieto-Castanon submitted Solution 566315 to Problem 2647. Find the maximal cliques in an undirected graph

on 27 Jan 2015 at 3:47

Alfonso Nieto-Castanon submitted Solution 566074 to Problem 2415. Temperature Conversion Utility (Strings)

on 26 Jan 2015 at 20:44

Alfonso Nieto-Castanon submitted Solution 566051 to Problem 2325. GJam 2014 Rd 1c: Reordering Train Cars (Large)

on 26 Jan 2015 at 20:23

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 submitted Solution 564980 to Problem 2484. BLOCK x3 (Version 3)

on 25 Jan 2015 at 5:59

Alfonso Nieto-Castanon submitted Solution 564976 to Problem 2478. BLOCK x3 (Version 2)

on 25 Jan 2015 at 5:24

Alfonso Nieto-Castanon submitted Solution 564973 to Problem 2451. BLOCK x3 (Version 1)

on 25 Jan 2015 at 5:17

Alfonso Nieto-Castanon submitted Solution 564950 to Problem 2316. Spin Matrices

on 25 Jan 2015 at 3:40

Alfonso Nieto-Castanon submitted Solution 564864 to Problem 2721. Pandigital Factors (Based on Euler 491)

on 25 Jan 2015 at 1:49

Alfonso Nieto-Castanon submitted Solution 564861 to Problem 2721. Pandigital Factors (Based on Euler 491)

on 25 Jan 2015 at 1:47

Alfonso Nieto-Castanon submitted Solution 564846 to Problem 2441. Bernoulli's Equation

on 25 Jan 2015 at 1:33

Alfonso Nieto-Castanon submitted Solution 564834 to Problem 2227. Broken numlock key, oppps !

on 25 Jan 2015 at 1:22

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 Solution 564598 to Problem 2876. Convert number from given base to other base

on 24 Jan 2015 at 18:17

Alfonso Nieto-Castanon submitted Solution 564593 to Problem 2875. Find difference of two set as per example

on 24 Jan 2015 at 18:13

Alfonso Nieto-Castanon submitted Solution 564591 to Problem 2874. Cumulative product of a vector

on 24 Jan 2015 at 18:12

Alfonso Nieto-Castanon submitted Solution 564590 to Problem 2874. Cumulative product of a vector

on 24 Jan 2015 at 18:11

Alfonso Nieto-Castanon submitted Solution 564426 to Problem 2266. 2048 tile game

on 24 Jan 2015 at 3:35

Alfonso Nieto-Castanon submitted Solution 564424 to Problem 2266. 2048 tile game

on 24 Jan 2015 at 3:28

Alfonso Nieto-Castanon submitted Solution 564419 to Problem 2075. twins or duplicate

on 24 Jan 2015 at 3:18

Alfonso Nieto-Castanon submitted Solution 564414 to Problem 2409. Find the Connecting Path

on 24 Jan 2015 at 3:02

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 Solution 564409 to Problem 2672. Largest Geometric Series

on 24 Jan 2015 at 2:39

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 Solution 564306 to Problem 2871. Help the Patriots get to the Super Bowl

on 23 Jan 2015 at 20:17

Alfonso Nieto-Castanon submitted Solution 564293 to Problem 2873. feeling VERY lucky?

on 23 Jan 2015 at 19:47

Alfonso Nieto-Castanon submitted Solution 564292 to Problem 2873. feeling VERY lucky?

on 23 Jan 2015 at 19:47

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

on 23 Jan 2015 at 19:42

Alfonso Nieto-Castanon submitted Solution 564279 to Problem 2872. Feeling lucky?

on 23 Jan 2015 at 19:07

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

Alfonso Nieto-Castanon submitted Solution 563738 to Problem 2458. Graph Algorithms - 1 : Length of the largest closed path

on 23 Jan 2015 at 6:01

Alfonso Nieto-Castanon submitted Solution 563658 to Problem 2265. 2048 Next Move

on 23 Jan 2015 at 4:23