A résolu


What day is it?
Tell me what day is it. Return the full name of the day of the week as a string. e.g. It's June 12th 2014, so your function s...

plus de 7 ans il y a

A résolu


Hydrogens in a Saturated Hydrocarbon
Given (c) carbon atoms in a saturated hydrocarbon molecule (all single bonds), how many hydrogen atoms (h) are in the molecule?

plus de 7 ans il y a

A résolu


Change matrix to vector2
From x = 4 3 5 1 5 1 To y = 4 3 5 1 ...

plus de 7 ans il y a

A résolu


Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.

plus de 7 ans il y a

A résolu


Log of a number
Write a script that will give the log of x as output.

plus de 7 ans il y a

A résolu


Feeling lucky?
Guess which number Cody is thinking (1 to 10)? (This is a game of luck more than skill. Good luck!)

plus de 7 ans il y a

A résolu


Can you reshape the matrix?
Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

plus de 7 ans il y a

A résolu


Find remainder when x is divided by 3
Find remainder when x is divided by 3

plus de 7 ans il y a

A résolu


find whether it is prime or not
For a given number find if its prime

plus de 7 ans il y a

A résolu


Is It a Palindrome?
Given a string or array, determine if it is a palindrome.

plus de 7 ans il y a

A résolu


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

plus de 7 ans il y a

A résolu


Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.

plus de 7 ans il y a

A résolu


Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

plus de 7 ans il y a

A résolu


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

plus de 7 ans il y a

A résolu


Find maximum value of a curve
Two vectors shall be already defined: - Input vector x (e.g. x = 0:1:10) - Result vector y (e.g. y = sin(x)) Create a n...

plus de 7 ans il y a

A résolu


Figurate number triangle
Check whether the input matrix is a figurate number triangle: <http://mathworld.wolfram.com/FigurateNumberTriangle.html>

plus de 7 ans il y a

A résolu


multiple of nine?
Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...

plus de 7 ans il y a

A résolu


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

plus de 7 ans il y a

A résolu


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

plus de 7 ans il y a

A résolu


Divisible by 10
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

plus de 7 ans il y a

A résolu


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

plus de 7 ans il y a

A résolu


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

plus de 7 ans il y a

A résolu


Determine the length of a string of characters
Determine the length of a string of characters

plus de 7 ans il y a

A résolu


Volume of a Parallelepiped
Calculate the volume of a Parallelepiped given the vectors for three edges that meet at one vertex. A cube is a special case ...

plus de 7 ans il y a

A résolu


Cody Matlab Version
What is the current Cody Matlab Release? *Output:* string *Examples:* '(R2012a)' or 'R2012a' Hint: We have mo...

plus de 7 ans il y a

A résolu


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

plus de 7 ans il y a

A résolu


Divisible by 5
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

plus de 7 ans il y a

A résolu


Matlab Basics II - Create a vector with a repeated entry
Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

plus de 7 ans il y a

A résolu


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

plus de 7 ans il y a

A résolu


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

plus de 7 ans il y a

Charger plus