Solved


Frugal number
check whether n is a frugal number * a frugal number is a natural number in a given number base that has more digits than the...

5 years ago

Solved


Last non-zero digit
Given a number n, find the last non-zero digit of the factorial of that number. You need to take care of the large values of n....

5 years ago

Solved


RISK Calculator - Large Armies, High Accuracy, Fast
This Challenge is to quickly provide the high precision probability of legal RISK battles up to 100 vs 100. [ Attack >= 2 and D...

5 years ago

Solved


Find the sum of all integers in a given matrix
Finding sum of all integers in a given matrix

5 years ago

Solved


Finding sum of even numbers in a vector.
Find the sum of all the even numbers present in the input vector x. Examples: Input x = [1 2 3 4] Output y is 6 Input...

5 years ago

Solved


Create a vector of the first n odd numbers (★)
If n = 10, your program should return a vector y, where y = [1 3 5 7 9 11 13 15 17 19].

5 years ago

Solved


Four digit number ABCD reversal
write a MATLAB function to find the four-digit number ABCD when multiplied by 4 returns DCBA. The function takes an input x=4.

5 years ago

Solved


Connect 4 (the boardgame)
You are playing the popular game "Connect 4" ( <https://en.wikipedia.org/wiki/Connect_Four>) against Matlab. Luckily, Matlab isn...

5 years ago

Solved


Construyendo matrices parte 2
Construye la siguiente matriz a partir de otros tres vectores/matrices. [ 1 8 15 3 3 3 3 2 9 16 3 3...

5 years ago

Solved


Count digits
Count total number of digits from 1 to n. * n=13 * output=17 since from [1-9] total 9 digits.[10-13] total 4*2=8 digits.

5 years ago

Solved


Identify Wagstaff primes
The numbers 3, 43, and 2731 are examples of <https://mathworld.wolfram.com/WagstaffPrime.html Wagstaff primes>. Write a func...

5 years ago

Solved


Times 5
Try out this test problem first. Given the variable x as your input, multiply it by five and put the result in y. Examples...

5 years ago

Solved


Construct a prime circle
A <https://mathworld.wolfram.com/PrimeCircle.html prime circle> is a circular arrangement of the numbers 1 to 2n such that pairs...

5 years ago

Solved


Determine whether a number is a cluster prime
A <https://mathworld.wolfram.com/ClusterPrime.html cluster prime> is an odd prime number _p_ such that all even numbers less tha...

5 years ago

Solved


Problem for beginners
Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

5 years ago

Solved


Problem for beginners
M is a nxm matrix. Swap the fist and the second last column with eachother. X=[1 2 3;4 5 6;7 8 9] Y=[2 1 3;5 4 6;8 7 9]

5 years ago

Solved


Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

5 years ago

Solved


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

5 years ago

Solved


Box
Give the volume of a box, x is equal to the body diagonal.

5 years ago

Solved


Square
X is a number, write a code, where Y should be the square of X.

5 years ago

Solved


Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

5 years ago

Solved


Simple Matrix
Make the following matrix without typing it in one by one. [1 2 3; 2 4 6; 4 8 12] x=[1 2 3].

5 years ago

Solved


Matrix problem for beginners
Make a matrix [0,0,0;1,1,1;2,2,2]. X=[0,1,2]

5 years ago

Solved


Matrix for beginners
Multiply x and y elemwise.

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

5 years ago

Solved


find nth even fibonacci number
1st even fibonacci number=2 ; 2nd even fibonacci number=8 ..

5 years ago

Solved


Quadratic equation
given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...

5 years ago

Solved


The End of the World
given a date -- represent it in the Maya long count system. <https://en.wikipedia.org/wiki/Maya_calendar> <https://maya.nm...

5 years ago

Solved


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

5 years ago

Solved


Lost days
Given two dates in a particular format, calculate the difference between them.

5 years ago

Load more