Solved


square of a number
find square of a given number

meer dan 4 jaar ago

Solved


Find the index of elements in a string vector
In the vector of v, find the index of elements specified by a. v = ["Lion","Koara","Elephant","Snake","Dog","Cat","Camel"]; ...

meer dan 4 jaar ago

Solved


Split array into pieces according to corresponding array
An array x of length n has values 1...m with each value appearing at least once. The values are sorted (n>=m). A second...

meer dan 4 jaar ago

Solved


Replace values out of an interval with the lower or upper values
For a vector or matrix X and an interval [n1,n2], the function replace every element of x inferior to n1 by n1, and every elemen...

meer dan 4 jaar ago

Solved


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? *Input:*...

meer dan 4 jaar ago

Solved


Electrical Diode Current Calculation
In engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instanc...

meer dan 4 jaar ago

Solved


Castling-03
Given the position of different chess pieces on the chessboard, figure out whether castling is valid or not in the next move (wh...

meer dan 4 jaar ago

Problem


Castling-03
Given the position of different chess pieces on the chessboard, figure out whether castling is valid or not in the next move (wh...

meer dan 4 jaar ago | 1 | 7 solvers

Solved


Castling-02
This is a follow up of problem <https://www.mathworks.com/matlabcentral/cody/groups/1/problems/45329-castling-01> Given...

meer dan 4 jaar ago

Problem


Castling-02
This is a follow up of problem <https://www.mathworks.com/matlabcentral/cody/groups/1/problems/45329-castling-01> Given...

meer dan 4 jaar ago | 1 | 7 solvers

Solved


Castling-01
Given the position of only player's chess pieces(some of them) on the chessboard, figure out whether castling is valid or not. ...

meer dan 4 jaar ago

Problem


Castling-01
Given the position of only one player's chess pieces(some of them) on the chessboard, figure out whether castling is valid or no...

meer dan 4 jaar ago | 1 | 12 solvers

Solved


Procrustean bed
Given a vector x and an integer n, convert x to a vector of length n by (1) chopping off the end if it is too long, or (2) addin...

meer dan 4 jaar ago

Solved


Convolution Power
Create the convolution-power vector from initial vector _x_ and power _n_. In other words, similar to the scalar case, raising ...

meer dan 4 jaar ago

Solved


How many rectangles in a grid ?
How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

meer dan 4 jaar ago

Solved


rectangle in circle
In the figure below, the rectangle at the corner measures a cm x b cm. What is the radius of the circle in cm? <<http://www....

meer dan 4 jaar ago

Solved


Rotate it!
Given a set of points, your aim is to rotate it by a given angle "theta" CCW (in 2d). The points are given in a matrix(x) of dim...

meer dan 4 jaar ago

Solved


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

meer dan 4 jaar ago

Solved


number of groups
In a classroom, *n* students work on a special project and the other students work in groups of five. If there are 18 students i...

meer dan 4 jaar ago

Solved


Find my secret function I
If give my function a x value it will give me a y value, so find the secret of it: Examples: input x=[2 5 6 8 9] ---- >>> o...

meer dan 4 jaar ago

Solved


Relation between functions "dec2bin" & "dec2binvec"
Here it's an easy problem we try to find the relation between the two functions "dec2bin" & "dec2binvec", so here you must write...

meer dan 4 jaar ago

Solved


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

meer dan 4 jaar ago

Solved


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

meer dan 4 jaar ago

Solved


Create incremental spiral WITHOUT USING EVAL or FEVAL
Constructions that use feval or eval are used to cheat with cody. This test-suite tries to avoid that trick. The goal of this...

meer dan 4 jaar ago

Solved


leap year
find the number of leap years within the given time interval

meer dan 4 jaar ago

Problem


leap year
find the number of leap years within the given time interval

meer dan 4 jaar ago | 1 | 61 solvers

Solved


Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

meer dan 4 jaar ago

Solved


Formatting currency numbers
Given a number, format it properly for textual display using the notation $xxx,xxx,xxx.xx. Assume that no more than two digits ...

meer dan 4 jaar ago

Solved


Find the nearest prime
Given a positive integer 'n', the task is to find a prime number greater than or equal to 'n'. Example 1 If given 'n' is ...

meer dan 4 jaar ago

Solved


Keep Only the Upper characters in a string
Keep Only the Upper characters in a string s = 'Sreeram Mohan'; output = SM;

meer dan 4 jaar ago

Load more