Solved


チェッカーボードを作ろう
整数 n が与えられた時、以下の様な1と0を含むn×nの行列を作成しましょう。a(1,1) は1にする必要があります。 例: 入力 n = 5 出力 a が [1 0 1 0 1 0 1 0 1 0 ...

11 years ago

Solved


Variable_Addition
be able to add any variable to the number one

11 years ago

Solved


Calculate square and cube of number
Calculate square and cube of number x

11 years ago

Solved


Determine if a row vector has NaN
Determine if a row vector x has NaN

11 years ago

Solved


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

11 years ago

Solved


Triangle Numbers Below N
This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...

11 years ago

Solved


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

11 years ago

Solved


Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

11 years ago

Solved


Double colon operator: Counting down
* Construct a row array countValues from startValue to endValue, elements decremented by -2 Ex: If startValue is 10 and end...

11 years ago

Solved


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

11 years ago

Solved


Areas
Given certain dimensions determine the area of that shape. If given only one value assume its the radius. Use round(x) to round ...

11 years ago

Solved


Increase monotonically
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

11 years ago

Solved


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

11 years ago

Solved


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

11 years ago

Solved


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

11 years ago

Solved


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

11 years ago

Solved


Perimeter
Given a sequence of points forming a closed path (first and last points are coincident) return the perimeter value. For example...

11 years ago

Solved


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

11 years ago

Solved


Wilf-Zeilberger pairs
Take as inputs two functions _F_ and _G_, and two scalar values _n_ and _k_. Test whether the functions are candidates to be a W...

11 years ago

Solved


Volume of a Simplex
Return the volume of a <http://en.wikipedia.org/wiki/Simplex regular _n_-simplex> with a unit side length. Results are up to...

11 years ago

Solved


Simple date to serial no. conversion
Convert a date string to a serial date number. For example if you take x='19-May-2001' then the result is 730990 x...

11 years ago

Solved


Book Club
A book club that has _K_ members, as a group, have to read _N_ books. Return how many different ways the members could read the ...

11 years ago

Solved


Don't Try, give up and return NaN.
This is another version of <http://www.mathworks.com/matlabcentral/cody/problems/3107-try-and-catch-simple-example problem 3107....

11 years ago

Solved


Rotate counterclockwise a matrix 90 deg with left-bottom element
Example: Input [ 1 2 3 4 5 6 ] Output [ 3 6 2 5 1 4 ]

11 years ago

Solved


Polybius Square
Given a string, calculate the coordinates. Input will be always in lowercase. If string is a sentence then use 0 (zero) to indic...

11 years ago

Solved


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

11 years ago

Solved


Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...

11 years ago

Solved


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

11 years ago

Solved


Changing a dd/mm/yyyy cell into a yyyymmdd int/double
Hi, i'm pretty to new to Matlab, I believe the title is self-explanatory. If anyone could help me out that would be great.

11 years ago

Solved


make a 10x10 vector of random numbers between 1 and 1000 and convert it into a 10x10 of all zeros
function heck_yes y = randi(10,1000) Converted = zeros(y)

11 years ago

Load more