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

New to MATLAB?

Recent Activity

Ntsikelelo Nonjoli submitted a Comment to Solution 594529

Hello I am a South African newbie, and this is how I solved it function b = most_change(a) a(:,1) = 0.25 .* a(:,1); a(:,2) = 0.05 .* a(:,2); a(:,3) = 0.1 .* a(:,3); a(:,4) = 0.01 .* a(:,4); a = a'; vecsum = sum(a); vecsum = vecsum'; [M,I] = max(vecsum); b = I; end

5 hours and 37 minutes ago

Ze Zhang submitted a Comment to Solution 10677

Wow! Brilliant!

10 hours and 37 minutes ago

Tim submitted a Comment to Solution 607934

The desired results are not the character strings 'true' and 'false' but the logical values true and false.

11 hours and 33 minutes ago

J.R.! Menzinger submitted a Comment to Solution 592305

length!! and not "not isempty"... good point! http://de.mathworks.com/matlabcentral/cody/problems/3031-expression-or-variable/solutions/608839

20 hours and 3 minutes ago

Binbin Qi submitted a Comment to Solution 608744

good work!perfect

on 31 Mar 2015 at 3:03

Zhao Dennis submitted a Comment to Problem 22. Remove the vowels

There is only five vowels in English.That is 'a,e,i,o,u'.

on 31 Mar 2015 at 2:03

Brian Moore submitted a Comment to Solution 180137

Brilliant use of complex numbers to force sort(x) to operate on abs(x)

on 30 Mar 2015 at 22:42

LY Cao submitted a Comment to Solution 608494

it works in matlab r2015a. LOL

on 30 Mar 2015 at 18:06

Grant III submitted a Comment to Problem 8044. Potential Energy

Juan, at a minimum you should provide the exact value for the constant that you are using (in this case, you've rounded g to 9.8). Also, please provide more than one test case; otherwise, people will game the system by just supplying the single static answer.

on 30 Mar 2015 at 16:58

Ned Gulley submitted a Comment to Problem 8044. Potential Energy

Juan, could you provide a little more information in the problem statement? What are the inputs? In what units? On what planet?

on 30 Mar 2015 at 16:20

Michel submitted a Comment to Problem 13. Remove all the consonants

http://www.oxforddictionaries.com/words/is-the-letter-y-a-vowel-or-a-consonant

on 30 Mar 2015 at 14:21

Zhao Dennis submitted a Comment to Solution 607934

Where did I do wrong?

on 29 Mar 2015 at 2:54

Li Yjie submitted a Comment to Solution 266710

are you ok?

on 28 Mar 2015 at 12:51

Zhao Dennis submitted a Comment to Solution 607682

Where did I do wrong?Please help me!

on 28 Mar 2015 at 12:49

Binbin Qi submitted a Comment to Solution 327824

perfect

on 27 Mar 2015 at 14:43

YUANYU YANG submitted a Comment to Problem 94. Target sorting

a nice practice.

on 27 Mar 2015 at 10:19

Peng Liu submitted a Comment to Solution 170884

Function name should be your_fcn_name

on 26 Mar 2015 at 23:12

Peng Liu submitted a Comment to Problem 1774. Free passes for everyone!

I solved this problem around 10 times. Why I can't get a free pass?

on 26 Mar 2015 at 19:56

Alexander Razmyslov submitted a Comment to Solution 449250

Very nice solution without for loop

on 26 Mar 2015 at 12:21

Peng Liu submitted a Comment to Solution 473284

Although it passes the test suite, this solution is incorrect for n = 4, 6. The main reason for this error is that the nested loop for j is incorrect. It should be for j=i:c

on 25 Mar 2015 at 12:25

Daniel Pereira submitted a Comment to Solution 600804

I got it on solution 600827. http://www.mathworks.com/matlabcentral/cody/problems/661-spot-the-outlier/solutions/600827

on 23 Mar 2015 at 15:34

Daniel Pereira submitted a Comment to Solution 600804

I'm sorry for this :(

on 23 Mar 2015 at 15:03

Daniel Pereira submitted a Comment to Solution 600694

Some cheating :), since the least score is always 0 in the test suite, despite the statement in the problem description.

on 23 Mar 2015 at 11:08

srujan reddy submitted a Comment to Solution 551534

Interesting one!

on 22 Mar 2015 at 14:47

Tim Hansen submitted a Comment to Solution 600215

There must be a quicker way to do this! What am I missing? 8)

on 21 Mar 2015 at 23:49

Riazul Arefin submitted a Comment to Problem 623. Rotate a Matrix

why i cannot use seqreverse here?

on 20 Mar 2015 at 19:44

Grant III submitted a Comment to Problem 3098. Scrabble Scores - 13

Jan & Binbin, thank you for your patience and in-depth error reporting. I was able to get the test suite and my code fixed to now report the same values that you found. I'm not sure how quickly the rescoring will propagate, so you might want to submit your solutions again. In case you're curious, there were two reasons for these errors. First, I had copied the word cell lists for starting words that had repeated letters (e.g., zoologist) but had failed to change the indices for the repeated letters. Second, my routine counted the multipliers outside of the loop on the starting index, so words with repeated letters that coincided with the tile in the starting word (e.g., a in althea) got their multiplier squares artificially doubled. But, all should be fixed now.

on 20 Mar 2015 at 18:07

Grant III submitted a Comment to Solution 599597

I'm confused why this works on my local version of Matlab but not the Cody server version?

on 20 Mar 2015 at 16:19

Dominik submitted a Comment to Problem 2019. Dimensions of a rectangle

An interesting problem providing the sqrt(10) factor.

on 20 Mar 2015 at 16:18

Tim Hansen submitted a Comment to Solution 599482

Would be helpful if you change the description to say that the result should be saved to y, rounded up to 3 decimal places. Also, that the present value should be calculated with discrete compounding, and not continuously compounded.

on 20 Mar 2015 at 14:27

Wang Yunhe submitted a Comment to Solution 310481

it is really a mental challenge

on 20 Mar 2015 at 11:01

Jan Orwat submitted a Comment to Problem 3098. Scrabble Scores - 13

In 6th test, case 2 my code has found 'medico' for 28 points instead of 'chez','zaideh' and 'chimed' for 21. Same test, case 1 gives 'haemoid' for 117 points instead of 26 for 'cohead','chimla' and 'gached'. In 4th test, case 2 I've got 16 points for 'iodine', and 16 also for 'endrin', 'indole', 'ironed' and 'linden'.

on 20 Mar 2015 at 10:37

Binbin Qi submitted a Comment to Problem 3098. Scrabble Scores - 13

I get the same result with Jan Orwat

on 20 Mar 2015 at 9:09

Jan Orwat submitted a Comment to Problem 3098. Scrabble Scores - 13

Hello Grant, how 'althea' in 2nd test is scored? I get (1+1*2+1+4+1+1)*2 = 20, but max_score_corr in this test is 44. My code has found 'maltha' for 30 points.

on 20 Mar 2015 at 7:40

Nicolas Hagen submitted a Comment to Problem 751. Implement simple rotation cypher

outStr=char(mod(inStr+shift-97,26)+97);

on 19 Mar 2015 at 10:59

Infee Choi submitted a Comment to Solution 598623

Eh, its simple as I can think of.

on 19 Mar 2015 at 10:24

rifat ahmed submitted a Comment to Solution 598549

just kidding. nice problem :)

on 19 Mar 2015 at 6:38

Binbin Qi submitted a Comment to Solution 598549

sorry, I forgot to rewrite,so changed.

on 19 Mar 2015 at 5:21

rifat ahmed submitted a Comment to Solution 598549

I hope you will not change the test suite to restrict this ;)

on 19 Mar 2015 at 4:55

Binbin Qi submitted a Comment to Solution 598506

recursion of anonymous is from the blog of Loren.

on 19 Mar 2015 at 3:31

Binbin Qi submitted a Comment to Solution 598537

this is what I want

on 19 Mar 2015 at 3:12

Alfonso Nieto-Castanon submitted a Comment to Solution 598506

Very nice! At first the problem felt a bit heavy handed with all those restrictions (no "if", no "round"???) but I see now what you were going for and I like it :)

on 19 Mar 2015 at 2:30

Binbin Qi submitted a Comment to Solution 598417

nice!

on 19 Mar 2015 at 1:28

Binbin Qi submitted a Comment to Solution 598438

you are right,it inspires us to create a lot of new idea that is my purpose

on 19 Mar 2015 at 1:27

Binbin Qi submitted a Comment to Solution 598443

Thank you , have fixed it.

on 19 Mar 2015 at 1:11

Alfonso Nieto-Castanon submitted a Comment to Solution 598443

the first test (checking 'for' loops, etc.) is not really doing anything...

on 19 Mar 2015 at 0:09

Paul Berglund submitted a Comment to Solution 598438

The thing about these "don't use this don't use that" problems is that there are so many ways around such restrictions.

on 18 Mar 2015 at 23:45

Alison submitted a Comment to Solution 598431

This solution is for only a 4x4 A. See Solution 598430 for general solution.

on 18 Mar 2015 at 22:24

Alison submitted a Comment to Solution 598430

This is the solution for A of any size.

on 18 Mar 2015 at 22:21