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

Learn moreOpportunities for recent engineering grads.

Apply TodayPaul Berglund submitted Solution 511896 to Problem 2571. Vectors counting by 2

on 11 Oct 2014 at 22:30

Paul Berglund submitted Solution 510752 to Problem 2621. Solve Linear equations

on 9 Oct 2014 at 0:46

Paul Berglund submitted Solution 509888 to Problem 2620. Determine the Anti-diagonal of a Magic Square

on 7 Oct 2014 at 15:52

Paul Berglund submitted a Comment to Problem 2585. How to reverse spdiags ?

% this problem is not guaranteed solvable
isequal(spdiags([eye(5) zeros(5)]),spdiags(eye(5)))

on 5 Oct 2014 at 0:17

Paul Berglund submitted Solution 506202 to Problem 2606. Decrypt the cypher using XOR encryption (for beginners)

on 28 Sep 2014 at 20:16

Paul Berglund submitted Solution 505685 to Problem 2591. Does the coin touch the line?

on 27 Sep 2014 at 1:28

Paul Berglund submitted Solution 505683 to Problem 2605. Find out value of polynomial at different value.

on 27 Sep 2014 at 0:40

Paul Berglund submitted Solution 504188 to Problem 2587. Find indices of diagonal elements

on 24 Sep 2014

Paul Berglund submitted Solution 504167 to Problem 2590. Create an anti-identity matrix

on 24 Sep 2014

Paul Berglund submitted Solution 503057 to Problem 2593. Polite numbers. N-th polite number.

on 20 Sep 2014

Paul Berglund submitted Solution 502810 to Problem 2597. Alternative Scoring. Create an incremental spiral.

on 19 Sep 2014

Paul Berglund submitted Solution 502809 to Problem 2287. Find the dimensions of a matrix

on 19 Sep 2014

Paul Berglund submitted Solution 502801 to Problem 2592. LocateMembership | Membership of Matrix in another matrix

on 18 Sep 2014

Paul Berglund submitted a Comment to Solution 502450

I think that this solution is perfectly legitimate. Why try to solve it "properly"? It's not like you are using eval or something like that. regexprep is a perfectly legitimate tool to use.

on 18 Sep 2014

Paul Berglund submitted Solution 496946 to Problem 2495. Find the first N zeros of the 666 function

on 6 Sep 2014

Paul Berglund submitted Solution 496935 to Problem 2440. Text processing - Help Johnny write a letter home from camp

on 6 Sep 2014

Paul Berglund submitted Solution 496928 to Problem 2494. What is the nth step in Conway's Life?

on 6 Sep 2014

Paul Berglund submitted Solution 496927 to Problem 52. What is the next step in Conway's Life?

on 6 Sep 2014

Paul Berglund submitted Solution 496911 to Problem 2558. Find out sum of all elements of given Matrix

on 6 Sep 2014

Paul Berglund submitted Solution 496910 to Problem 2538. Find the Next Legal Move in Reversi

on 6 Sep 2014

Paul Berglund submitted Solution 496642 to Problem 2534. Path of least resistance - Move all direction

on 6 Sep 2014

Paul Berglund submitted a Comment to Problem 2534. Path of least resistance - Move all direction

OK, you're right about test case 2. I was wrong. But I get 6 for test case 1, not 7. The shortest path does not include upper right corner.

on 3 Sep 2014

Paul Berglund submitted a Comment to Problem 2534. Path of least resistance - Move all direction

I get 11 for test case 2.

on 1 Sep 2014

Paul Berglund submitted a Comment to Problem 2534. Path of least resistance - Move all direction

I don't understand how this works with negative elements. For example if the input matrix is [0 -1;0 0] it is possible to obtain an arbitrarily low score by going [EastWest] sufficiently many times then EastSouth.

on 30 Aug 2014

Paul Berglund submitted Solution 493950 to Problem 2539. Add one raw in given matrix as shown in example

on 30 Aug 2014

Paul Berglund submitted Solution 493375 to Problem 2527. Cull vector elements that contain a specified digit

on 29 Aug 2014