Cody

Trending Groups

Popular Problems

Problem Title Likes Solvers

104

29447

68

23748

46

20167

39

17626

71

14287

49

13010

Pizza!

Created by: the cyclist

Tags pizza, fun

221

12816

205

11926

55

11527

Triangle Numbers

Created by: Cody Team

Tags math

42

11174

Recent Activity

J-G van der Toorn submitted a Comment to Problem 1042. Operate on matrices of unequal, yet similar, size

The assignment is to "... create a function that operates on two arguments, performing one of the operations 'plus', 'minus', 'times', 'power', 'ldivide' or 'rdivide' (specified as the 3rd argument), after it has matched the sizes of first two input arguments." So you have to make a functions that performs one of the basic math operations on two input arguments, and which operation it should be is determined by the 3rd input argument. You are lucky that nowadays Matlab itself tries to match the size of the input arguments of those operations. So if you add a scalar to a vector, the program is that smart that it uses the scalar term for all vector terms. And when the 1st argument is a column vector, it is used for all columns of matrix when the 2nd argument is a matrix that has an equal number of rows as the column has. When this 'problem' was created, Matlab did not do that by itself, and you had to take care of that yourself. So the problem is is even easier than you may think. See 'help ops' for basic math in Matlab.

20 minutes ago

J-G van der Toorn submitted Solution 1568599 to Problem 1042. Operate on matrices of unequal, yet similar, size

26 minutes ago

David Verrelli submitted Solution 1568596 to Problem 44037. Pascal's triangle

1 hour and 3 minutes ago

David Verrelli submitted Solution 1568595 to Problem 44037. Pascal's triangle

1 hour and 5 minutes ago

David Verrelli submitted Solution 1568594 to Problem 44037. Pascal's triangle

1 hour and 8 minutes ago

David Verrelli submitted Solution 1568592 to Problem 44037. Pascal's triangle

1 hour and 12 minutes ago

David Verrelli submitted Solution 1568590 to Problem 44037. Pascal's triangle

1 hour and 15 minutes ago

David Verrelli submitted Solution 1568589 to Problem 44037. Pascal's triangle

1 hour and 17 minutes ago

David Verrelli submitted Solution 1568584 to Problem 44033. row removal

1 hour and 25 minutes ago

Dylan Rowe submitted Solution 1568582 to Problem 17. Find all elements less than 0 or greater than 10 and replace them with NaN

2 hours and 5 minutes ago