已解决


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

10 years 前

已解决


Reverse a matrix
Its simple. You have to reverse a given matrix.

10 years 前

已解决


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

10 years 前

已解决


Binary Coder
Take an input number and print the binary value of this number.

10 years 前

已解决


Column norms of a matrix
Given a matrix M, return a vector y such that for each k y(k)=norm(M(:,k)) (y(k) is the Euclidean norm of the k-th col...

10 years 前

已解决


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

10 years 前

已解决


find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R) for example I=5,h=4 then the ans R=3;

10 years 前

已解决


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

10 years 前

已解决


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

10 years 前

已解决


Max of a Vector
Write a function to return the max of a vector

10 years 前

已解决


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

10 years 前

已解决


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (http://en.wikipedia.org...

10 years 前

已解决


Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

10 years 前

已解决


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...

10 years 前

已解决


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

10 years 前

已解决


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

10 years 前

已解决


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

10 years 前

已解决


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

10 years 前

已解决


Find the "ordinary" or Euclidean distance between A and Z
A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

10 years 前

已解决


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

10 years 前

已解决


Positive Infinity
Round the array a towards positive infinity

10 years 前

已解决


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

10 years 前

已解决


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

10 years 前

已解决


ASCii Code
Using Matlab get the ASCii for '?'

10 years 前

已解决


Add 7
Given an input variable x, output a variable y that is 7 greater than x. Example: Input x = 1 Output y is 8 Input ...

10 years 前

已解决


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

10 years 前

已解决


matlab indian players
answer is one of the indian matlab player(just for fun dont take serious)

10 years 前

已解决


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

10 years 前

已解决


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

10 years 前

已解决


Back to basics 24 - Symbolic variables
Covering some basic topics I haven't seen elsewhere on Cody. Given a string algebraic expression, return the symbolic variabl...

10 years 前

加载更多