Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


Number Puzzles - 006

11 mesi fa

Risolto


Rotate matrix by coloumns

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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.

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Risolto


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

11 mesi fa

Carica altro