Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

4 years ago

Solved


Count me in
Count the number of occurrences of the second input in the first input Ex. x1 = 12344455511; x2 =2; output = 1 ...

4 years ago

Solved


Convert degrees to radians
Given input in degrees, output to radians

4 years ago

Solved


Create tangent function out of cosine only
Please don't use tangent and sine functions

4 years ago

Solved


Create sine function out of cosine
Please don't use sin(x) directly

4 years ago

Solved


Freebies anyone? No!!!!
Feel free to copy paste all the tests and voila you solved the problem

4 years ago

Solved


Energy of a photon
*&#9883 &#9762 &#9883 &#9762 &#9883 &#9762 &#9883* Given the frequency F of a photon in giga hertz. Find energy E of this...

4 years ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

4 years ago

Solved


Create cosine function out of sine
Please dont use cos(x) directly

4 years ago

Solved


Convert decimal to binary and then generate the minimum binary it can with jumbling
input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

4 years ago

Solved


Beat the test suite if you can :)
Solve this problem based on clues in the test suite.

4 years ago

Solved


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

4 years ago

Solved


Determinant of a 3x3 Matrix
Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.

4 years ago

Solved


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

4 years ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

4 years ago

Solved


How many bottles can you drink?
Sometimes if you buy a drink in a glass bottle you can return that bottle and get some money back. Let's assume we have "x" a...

4 years ago

Solved


Convert radians to degrees
Given input in radians, output to degrees

4 years ago

Solved


radius of a spherical planet
You just measured its surface area, that is the input.

4 years ago

Solved


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

4 years ago

Solved


poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
This problem is a poll (and a little bit of "white hat hacktivism" as well) regarding Cody users sentiment about the use of rege...

4 years ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

4 years ago

Solved


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

4 years ago

Solved


Simple equation: Annual salary
Given an hourly wage, compute an annual salary

4 years ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

4 years ago

Solved


Basics - not so easy division
Please make a function whcih divides x/y, but pay attention for some exceptions with NaN,0,Inf. Sometimes return "ERROR" instead...

4 years ago

Solved


Basic commands - Greatest common divisor
Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

4 years ago

Solved


Narcissistic problem
How many likes has this problem?

4 years ago

Solved


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

4 years ago

Solved


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

4 years ago

Solved


Basic commands - amount of inputs
Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

4 years ago

Load more