Solved


Penny Distribution Machine
A machine consists of a row of boxes. To start, one places N pennies in the leftmost box. The machine then redistributes the pen...

8 years ago

Solved


Is input the global variable z?
When the input is certainly not the global variable |z|, your function must return |false|. Otherwise return |true|. All input...

8 years ago

Solved


Test your luck!
This problem is designed to test your luck, and therefore the contents of your function are irrelevant. In order to do so, the t...

8 years ago

Solved


How many days?!?
Christmas is coming earlier and earlier each year. Thanks to rampant commercialism and Christmas Creep, "The Twelve Days of Chr...

8 years ago

Solved


You never ask a lady her age
Instead you ask her to multiply her age by 10, then subtract any of the first nine multiples of 9 (9,18,...,81), and tell you th...

8 years ago

Solved


Which permutation is it?
Let write some permutations of positive integers. 1: 1 2 3 4 5 6 ... 2: 2 1 3 4 ... 3: 1 3 2 4 ....

8 years ago

Solved


N-th permutation.
Let write some permutations of positive integers. 1: 1 2 3 4 5 6 ... 2: 2 1 3 4 ... 3: 1 3 2 4 ... ...

8 years ago

Solved


Parcel Routing
Given a matrix that represent the distance along highways between major cities numbered 1 to _N_, provide the path and shortest ...

8 years ago

Solved


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x=[1 2 3 4 5 6 7 ...

8 years ago

Solved


Amicable numbers
Test whether two numbers are <https://en.wikipedia.org/wiki/Amicable_numbers amicable>, meaning that the sum of the proper divis...

8 years ago

Solved


Exponents in Factorials(hard)
This is problem is a harder version of "Problem 44747. Exponents in Factorials". <https://ww2.mathworks.cn/matlabcentral/cody/p...

8 years ago

Solved


Exponents in Factorials
It's time to get excited about numbers!!! Well, we're just dealing with factorials here, but it's still a good reason to get ex...

8 years ago

Solved


Pizza order
A pizza order by phone in diameter d1, pizza will be make only in diameter d2. Return the pizza pieces p should be make.(pizza ...

8 years ago

Solved


Return all matrix elements except elements on diagonal
Consider a given Matrix A=[a b c; d e f; g h i] then return a row vector T such that it contains all the El...

8 years ago

Solved


Find the area of a triangle having vertices (A,B), (C,D), and (E,F)
Find the area of a triangle using if we have the three vertices of the triangle

8 years ago

Solved


New Matrix with vector addition on diagonal
consider 2 vectors x=[1 2 3] y=[4 5 6] then generate a new Matrix, where Addition of x & y will be diagonal Elements...

8 years ago

Solved


Reverse the Matrix
Given a Matrix A, reverse it. Such that, last element of A becomes 1st and vice versa. for example: Input = [1 2 3;4 5 ...

8 years ago

Solved


Get the combinations
Consider p,q = 2 vectors of same or different length. Get a Output Array which has all the possible combinations of Elements o...

8 years ago

Solved


Large Sum (inspired by Project Euler 13)
Your function will be provided an arbitrary number of numbers of arbitrary sizes as a cell array of strings. Some numbers will b...

8 years ago

Solved


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

8 years ago

Solved


Highly divisible triangular number (inspired by Project Euler 12)
Triangular numbers can be calculated by the sum from 1 to n. For example, the first 10 triangular numbers are: 1, 3, 6, 10, ...

8 years ago

Solved


Substring Extraction
In a given string, find the substring between Start_string and End_string. You will have to include or exclude the Start_str...

8 years ago

Solved


Find the Pattern
Find the pattern between input and output. Write a function that gives the correct output for any input. *Hint: magic*

8 years ago

Solved


Raise each element to the power of its index in a matrix
In a matrix, A = [1,2;3,4] raise the power of each element like: 1^1+2^3+3^2+4^4 and add it all to produce the result 274

8 years ago

Solved


Pass the Threshold!!
Write a Matlab function that will take as input a matrix of arbitrary dimensions and a scalar threshold value, and return a vec...

8 years ago

Solved


Make your own Test Suite (part 0)
_Have no knowledge of <https://au.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html "floating-point numbers">? ...

8 years ago

Solved


Comparison of floating-point numbers (doubles)
<https://au.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html Floating-point numbers> cannot generally be repres...

8 years ago

Solved


Comparison of floating-point numbers (singles)
<https://au.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html Floating-point numbers> cannot generally be repres...

8 years ago

Solved


Toads and Frogs Puzzle 2
On a two-dimensional board with 2n + 1 rows and 2n + 1 columns, all (2n + 1)^2 positions of the board, except the central one, a...

8 years ago

Solved


Counting Squares
An algorithm starts with a single square and on each of its next iterations adds new squares all around the outside as shown bel...

8 years ago

Load more