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

Recent Activity

Björn Skatt submitted a Comment to Solution 536318

So wise.

10 hours and 26 minutes ago

Binbin Qi submitted a Comment to Problem 2247. Dimensions of Spaces

http://en.wikipedia.org/wiki/Fundamental_theorem_of_linear_algebra

14 hours and 48 minutes ago

Ziko submitted a Comment to Solution 535203

because of rounding errors. B = round(a1*b1); it should work in this case as all numbers are integers.

19 hours and 12 minutes ago

Zahi Wei submitted a Comment to Solution 16258

How?

23 hours and 20 minutes ago

Ned Gulley submitted a Comment to Problem 2692. design a magic matrix without using the command magic.

Hi Anumpam: Thanks for the problem. You need to fix the test suite as James says. Also, since you haven't specified what order you want the numbers in, you should probably check to make sure the matrix has magic properties (rows add to the same number, etc.) rather than testing that it matches exactly one matrix. There are lots of magic 4-by-4 matrices.

on 26 Nov 2014 at 14:52

James submitted a Comment to Solution 535728

You're returning the string "true" or "false" which the test suite is trying to compare to a boolean variable true or false. Since the string does not equal the boolean value, assert fails.

on 26 Nov 2014 at 14:23

James submitted a Comment to Problem 2692. design a magic matrix without using the command magic.

Please correct the test suite so there are brackets around your y_correct. Adding a couple of other magic squares (5 and 6) would also help.

on 26 Nov 2014 at 14:17

Kehkashan Saleem submitted a Comment to Solution 535728

what is wrong with the solution?

on 26 Nov 2014 at 9:11

Zahi Wei submitted a Comment to Solution 351405

i don't know how to cheat. Could you tell me?

on 26 Nov 2014 at 4:33

Jan Orwat submitted a Comment to Problem 2690. Armstrong Number

Same as problems 1008 and 2061.

on 25 Nov 2014 at 20:33

Michael C. submitted a Comment to Problem 2529. Solving Quadratic Equations (Version 2)

No need to fear complex roots...

on 25 Nov 2014 at 15:05

VIVEK RUHELA submitted a Comment to Solution 535203

can anybody tell me why this solution is not working:"[a,b] = qr(A); [a1,b1] = qrdelete(a,b,n); y = a1*b1;" Although it gives right answers to all test Suits in the software.Plz

on 25 Nov 2014 at 8:31

Christopher Zerafa submitted a Comment to Solution 534945

B=A(:,1:end-1); What is wrong here?

on 24 Nov 2014 at 23:59

Sreeram Mohan submitted a Comment to Problem 2021. Is this triangle right-angled?

This is a good problem to refresh basic geometry

on 24 Nov 2014 at 9:24

Simon submitted a Comment to Solution 533333

2 points better than my previous solution with ~any(isnan( Passes the defined tests, but would fail if Inf was in the test matrices.

on 23 Nov 2014 at 9:31

Matt Eicholtz submitted a Comment to Problem 2680. put the answer 'Go Blazers' in the string

Hayden, try this for the test suite... %% assert(isequal(your_fcn_name(1),'Go Blazers'))

on 23 Nov 2014 at 9:11

Kaloyan submitted a Comment to Solution 532416

test 5 and test 6 are wrong. the true answer of test 5 is 2, and for test 6 it is 1.

on 22 Nov 2014 at 9:39

VIVEK RUHELA submitted a Comment to Problem 2680. put the answer 'Go Blazers' in the string

y_correct should be mention because everytime the message is like this::Error: Output argument "y" (and maybe others) not assigned during call to "/users/msssystem6/your_fcn_name.m>your_fcn_name".So plz mention y_correct

on 22 Nov 2014 at 9:00

Matt Eicholtz submitted a Comment to Problem 2671. Check if vertices form a rectangle

Ah yes, I agree. Test suite updated again.

on 22 Nov 2014 at 5:49

Ciuban Sebastian submitted a Comment to Solution 531996

function y = equation(x) syms f z f=3*z^5-z^3+8*z-3 y=subs(f,x) end why is not working?

on 21 Nov 2014 at 20:56

Jan Orwat submitted a Comment to Problem 2671. Check if vertices form a rectangle

Matt, Jon's example can 'kill' some approaches, that check for trapezoids. X=[-1 -0.5 0.5 1]; Y=[0 sqrt(3)/2 sqrt(3)/2 0]; can eliminate those solutions which check only for 3 unique distances between points. It would be beneficial, to try some trapezoids, as well as kites or rhombi. Anyway, great problem!

on 21 Nov 2014 at 19:37

Matt Eicholtz submitted a Comment to Problem 2671. Check if vertices form a rectangle

Jon, I updated the test suite to include parallelograms that are not rectangles. While it does not include the specific example you gave, I think it takes care of the problem. Let me know if you think there is still an issue.

on 21 Nov 2014 at 18:34

Matt Eicholtz submitted a Comment to Solution 531205

Thanks for bringing this to my attention Jan. Test suite has been updated.

on 21 Nov 2014 at 15:33

Jan Orwat submitted a Comment to Problem 877. What is Title of Cody Challenge 42?

urlr...

on 21 Nov 2014 at 15:00

James submitted a Comment to Solution 531692

Time to work on plan B; pdist isn't valid in Cody. :-(

on 21 Nov 2014 at 14:03

Pritesh Shah submitted a Comment to Problem 877. What is Title of Cody Challenge 42?

Any hint??

on 21 Nov 2014 at 12:53

Paul submitted a Comment to Solution 531513

In the test suite, you need to declare y_correct. Otherwise, it returns the following: Error: Undefined function or variable 'y_correct'.

on 21 Nov 2014 at 3:49

Meng submitted a Comment to Solution 475238

tf should be TRUE or FALSE, not a string

on 21 Nov 2014 at 3:15

Jean-Marie SAINTHILLIER submitted a Comment to Problem 2674. Generalised Hamming Number

Thank you Jonathan. I have discovered this philosophy thanks to James and @bmtran problems.

on 20 Nov 2014 at 22:02

Jean-Marie SAINTHILLIER submitted a Comment to Problem 2678. Find out sum and carry of Binary adder

You should maybe test all the truth table no ?

on 20 Nov 2014 at 21:53

Jonathan submitted a Comment to Problem 2674. Generalised Hamming Number

I like your test suite. Using large X forces a better solution.

on 20 Nov 2014 at 14:59

Jan Orwat submitted a Comment to Solution 531205

This one should not pass, it checks for parallelograms.

on 20 Nov 2014 at 13:31

Pritesh Shah submitted a Comment to Solution 530926

May be NOt in cody...

on 20 Nov 2014 at 6:15

Tim submitted a Comment to Solution 528431

Sure, ok.

on 19 Nov 2014 at 18:22

Oyeniyi submitted a Comment to Solution 530926

harmmean(x) does exist

on 19 Nov 2014 at 17:20

Jonathan submitted a Comment to Problem 174. Roll the Dice!

To clarify the problem statement, it would be good to specify the dice are fair.

on 19 Nov 2014 at 15:18

Pritesh Shah submitted a Comment to Solution 530239

Try some logic... Instead of hard code...

on 19 Nov 2014 at 4:35

Peter submitted a Comment to Problem 36. Find relatively common elements in matrix rows

Indeed, the current leading solutions with size 29 yield only elements that exist in ALL of the rows in the matrix!

on 18 Nov 2014 at 21:58

Evan submitted a Comment to Solution 530459

More test cases are needed to prevent answers like this.

on 18 Nov 2014 at 21:13

Jon submitted a Comment to Problem 2671. Check if vertices form a rectangle

Most current solutions will fail if the four points fall on a circle but don't form a rectangle. Try adding X=[0 sqrt(2)/2 sqrt(2)/2 0]', Y=[1 sqrt(2)/2 -sqrt(2)/2 -1]'

on 17 Nov 2014 at 14:36

Abhilash submitted a Comment to Solution 529557

Tried using accumarray on an experimental basis... freaky awesome!!!

on 16 Nov 2014 at 10:05

VIVEK RUHELA submitted a Comment to Solution 528431

@Mr. Tim . Atleast You give me positive reply.Thanks a lot.Can I further talk to you regarding MATLAB CODY Guidence..

on 15 Nov 2014 at 14:14

Tim submitted a Comment to Solution 528431

The "y=" is missing from "y=sum(x)".

on 14 Nov 2014 at 23:10

VIVEK RUHELA submitted a Comment to Solution 528431

why y=sum(x) is wrong. Still I made the same function on MATLAB software and it runs and give correct answer. Can anybody tell me whats going on......

on 14 Nov 2014 at 4:53

Martin Le François submitted a Comment to Problem 167. Pizza!

Nice one! I need to go buy the shirt now.

on 14 Nov 2014 at 2:01

VIVEK RUHELA submitted a Comment to Solution 528077

I've checked this coding:"[a,b] = qr(A); [a1,b1] = qrdelete(a,b,n); B = a1*b1;" Why this not working??? Can anybody check this....

on 13 Nov 2014 at 15:17

Alex submitted a Comment to Solution 527969

You have inverted dime and nickel in your problem wich produce an inconvenient mystake.

on 13 Nov 2014 at 12:57

TAO Ran submitted a Comment to Problem 145. Increment a number, given its digits

Anyone has suggestions on a clean way of doing this?

on 12 Nov 2014 at 7:14

VIVEK RUHELA submitted a Comment to Problem 3. Find the sum of all the numbers of the input vector

What is the size of vector....is it [1*n] or [n*m]

on 12 Nov 2014 at 6:12

Gareth Lee submitted a Comment to Solution 393150

how to improve this size to 10?

on 11 Nov 2014 at 3:24