解決済み


Sum the real and imaginary parts of a complex number
Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

2年弱 前

解決済み


For a rectangle, if x is the length and 2x is width. Then find out x from the area of the rectangle?
For a rectangle, if x is the length and 2x is the width. Then find out x from the area of the rectangle? if the area is equal...

2年弱 前

解決済み


Pronounce digits
Given a number num, select the first d decimal places and pronounce the digits (in English). The function returns the pronunciat...

2年弱 前

解決済み


Get ranks of values in a vector
For a given vector, say [6 3 8 2], return the ranks (ascending) of observations, i.e. [3 2 4 1]. Do not worry about tied ranks. ...

2年弱 前

解決済み


Accurate Division
Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros. Example...

2年弱 前

解決済み


List the Moran numbers
The quotient of a Moran number and its digit sum is prime. For example, 117 and 481 are Moran numbers because 117/(1+1+7) is 13 ...

2年弱 前

解決済み


Valid Chess Moves
Using standard Algebraic notation ('' for a pawn), given previous move and a next move, output true if it is a valid move or fal...

2年弱 前

解決済み


Compress list
Given a non-empty list L of positif integers, compress the list so that only one occurrence is retained if two (or more) equal e...

2年弱 前

解決済み


Find the nearest value to the given one

2年弱 前

解決済み


Do you have the minimum age?

2年弱 前

解決済み


Highest building

2年弱 前

解決済み


Sort Except Zeros
Sort the numbers in a vector. But the position of zeros should not be changed. Example: sort_except_zeros( [5 3 0 0 2 4] ) == [...

2年弱 前

解決済み


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

2年弱 前

解決済み


Interval Compression
Given a set of integers, the task is to create a list of closed intervals where each interval includes its endpoints. For exampl...

2年弱 前

解決済み


Out-of-Place Elements Count
Determine the number of elements in a list of integers that are not in their original order after sorting the list in ascending ...

2年弱 前

解決済み


Give a matrix that matches itself when rotated
Given n and s, return a n-by-n matrix a of integers such that sum(sum(a == rot90(a))) is equal to exactly s. The integer...

2年弱 前

解決済み


Dancing with wolves?
let wolf() make one or two steps to get a feel of the beat, it is waltz, do not let wolf() make the third step, return safely ju...

2年弱 前

解決済み


Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

2年弱 前

解決済み


square a vector-Given the variable x as your input, square it and put the result in y.
function y = (x)squared y = x; end

2年弱 前

解決済み


Finding area of a triangle.
Find the area of an equalateral triangle with sides of 3 inches,

2年弱 前

解決済み


Compute LOG(1+X) in natural log
Compute LOG(1+X) in natural log

2年弱 前

解決済み


10% Discount

2年弱 前

解決済み


The Number of Ways
Find all the possible ways to reach the end of a matrix. So given [a b c d] the possible ways [a c],[a d],[b c],[b ...

2年弱 前

解決済み


Number of paths on a n-dimensional grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid> and <https:/...

2年弱 前

解決済み


Number of paths on a 3d grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid>, which you mi...

2年弱 前

解決済み


Triangle of numbers
Create a matrix with the integers from 1 to |n| arranged in a triangular shape. Every row |i| of the matrix contains |i| inte...

2年弱 前

解決済み


Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

2年弱 前

解決済み


Eye Squared
For a positive integer |n| create the identity matrix with |n| elements. In case it is not possible to produce an identity ma...

2年弱 前

解決済み


Product of Each Column
Given a matrix |mat| with |n| columns, return a row vector |v| of length |n|, where every element in |v| is the product of the |...

2年弱 前

さらに読み込む