Gelöst


Prime number check (★★)
One way to see if a number x is prime is to compute the remainders obtained when dividing x by all integers from 2 to √(x). If x...

10 Monate vor

Gelöst


Determinant of a 3x3 Matrix
Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.

10 Monate vor

Gelöst


Check if a year is a leap year or not
Return 1 if a given year is a leap year or 0 if it is not

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


Horizontal matrix sort
Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...

10 Monate vor

Gelöst


Power of n ?
Determine if x (positive integer) is a power of n, return true or false accordingly.

10 Monate vor

Gelöst


Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


Linear Motion 7
A robot has a maximum rate of acceleration of a m/s2. If the robot starts from rest and reaches a velocity of v2 m/s. How far ha...

10 Monate vor

Gelöst


Linear Motion 6
An experimental vehicle traveling at v1 m/s is brought to a full stop in t seconds. How far does it travel before stopping? Roun...

10 Monate vor

Gelöst


Number Puzzles - 006

10 Monate vor

Gelöst


Rotate matrix by coloumns

10 Monate vor

Gelöst


Grandpa's telescope
Two grandkids Dorothy and Benjamin are sharing a telescope made by their grandpa, who used an old lens of spectacles as the obje...

10 Monate vor

Gelöst


Opposite point of the earth, what is the antipodal of a point ?
Given two strings(lat and long) that represent the geographic coordinates of a point in the earth, you have to find out what is ...

10 Monate vor

Gelöst


Cookie Cutters
Given a larger and smaller matrix, perform element-by-element multiplication on the smaller matrix and a sub-matrix of the large...

10 Monate vor

Gelöst


Jack's hand in "Titanic" ♤
Given a series of cards, return true if it's the famous hand. Note that i pretend that poker cards goes from 1 to 10 so be care...

10 Monate vor

Gelöst


balance vector
Given a non-empty vector x with integer elements. x shall be called balance vector if one can split the elements of x into two g...

10 Monate vor

Gelöst


Perl 2: pop
This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab? ...

10 Monate vor

Gelöst


Periodic Table II 101.
Given the symbol of an element, return its atomic number. This is the continuation of <http://www.mathworks.com/matlabcentral/co...

10 Monate vor

Gelöst


Cricket - How Much More to Beat Bradman?
Sir Don Bradman famously needed only 4 runs in his final innings to retire with an average of 100. Out for a duck, he ended inst...

10 Monate vor

Gelöst


Scrabble Scores - 2
An <https://www.mathworks.com/matlabcentral/cody/problems/56-scrabble-scores introductory Cody problem> asks the user to score a...

10 Monate vor

Gelöst


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

10 Monate vor

Gelöst


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

10 Monate vor

Gelöst


Number Puzzle - 094
Give an example of three unique numbers a, b, and c such that concatenating a^2, b^2, and c^2 is equal to d^4 for an integer d.

10 Monate vor

Gelöst


is the number happy?
test is a given integer number is Happy of not? answer 1 if yes or 0 is no

10 Monate vor

Gelöst


Adjoint matrix
given a matrix a, find the adjoint matrix of a.

10 Monate vor

Gelöst


Kurchan 5x5 - Optimal Score
Related to Problems 1646 and 2650, but bigger. Technically, all you need to do for this Cody problem is input a 5x5 matrix conta...

10 Monate vor

Gelöst


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

10 Monate vor

Gelöst


Resistance of a robot
What is the resistance of an industrial robot that draws P watts of power when connected to a power supply delivering V volts? R...

10 Monate vor

Gelöst


Consecutive Powers
Return 2 numbers and 2 powers such that their difference is 1 A 4 element row vector is expected: x where x(1)^x(2) - x(...

10 Monate vor

Mehr laden