Solved


Finite Continued Fraction
Given an input real number x and a natural number n, output the row vector with the n first terms of the continued fraction. F...

5 years ago

Solved


Coin distribution
Imagine, u r in a shop. ur bill is n(2200). u want to pay the bill with minimum no of coins u have. u've coins of - 2000,1000...

5 years ago

Solved


Sieve of Eratosthenes - 02
"Sift the Two's and Sift the Three's, The Sieve of Eratosthenes. When the multiples sublime, The numbers that remain a...

5 years ago

Solved


Sky full of stars - 03
draw the following pattern with asterisks. For example, for n=6 '************' '***** *****' '**** ****' ...

5 years ago

Solved


Sky full of stars - 02
draw an isosceles triangle with asterisks of size n. For example, for n=6 ' * ' ' *** ' ' **...

5 years ago

Solved


Sky full of stars - 01
Draw a right triangle with asterisks of size n. For example, for n=5 '* ' '** ' '*** ' '**** ' ...

5 years ago

Solved


Float like a cannonball
Given gravity on earth (g=9.81 [m/s/s]) find the distance s [m] by a cannonball propelled at a speed of u [m/s] from the origin ...

5 years ago

Solved


the fly, the train, the second train, and their Zeno's paradox
*You have heard this one*: A train leaves station _A_ and travels with constant velocity _v1_. A second train leaves station _B_...

5 years ago

Solved


Calculate Alcohol By Volume with Original and Final Gravity
Given an initial gravity of un-fermented wort (OG) and a final gravity of fermented wort (FG), better known as beer, it is possi...

5 years ago

Solved


2048 Next Move
Given a board in the game 2048 (see the game here: <http://gabrielecirulli.github.io/2048/ 2048>) and a direction ('up','down','...

5 years ago

Solved


Which coins to give
I was in shop today. I admired, how shop assistant had to think, which coins to give me. The task is we have a vector v=[0.5 0....

5 years ago

Solved


what can you get for exactly amount of money
You go to store, where each product has price. Prices are in vector s = [ 195 125 260 440 395 290] and you have amount ...

5 years ago

Solved


Maya - 03
Following up on the previous two problems, now you've to add or subtract two Maya numerals. The 3rd input will be a function ...

5 years ago

Solved


Maya - 02
<https://en.wikipedia.org/wiki/Maya_numerals> Prev. prob. - <https://www.mathworks.com/matlabcentral/cody/problems/45375-maya...

5 years ago

Solved


Maya - 01
Given a number, convert it into the Maya numeral system. <https://en.wikipedia.org/wiki/Maya_numerals> For example, n...

5 years ago

Solved


Unique - Very Very Large Numbers
Given a vector column, with some very large numbers, create the ascending sort and unique vector. *Input:* A (column vector)...

5 years ago

Solved


speed vs size
The given string describes some MATLAB expressions such as 'pause(1)'. Compute its performance score = code size + run time in m...

5 years ago

Solved


count any radix?
given radix r(2-9), digts d(1-4), give all possible strings in sorted order. for example, if r=2, d=2, then output {'00' '01' '1...

5 years ago

Solved


convert?
* Given a string containing a number followed by pounds or kgs, for example: * 'Billy lost 22 pounds in four weeks.' * 'Maria ...

5 years ago

Solved


ranch area?
Your friend has a ranch with four distinct boundary lines. Three boundary lines are ideal straight roads: (1) North Club Road, (...

5 years ago

Solved


Dick Van Dyck?
* Not the celebrity, <http://en.wikipedia.org/wiki/Dick_Van_Dyke Dick Van Dyke>, * this problem relates to balanced strings of...

5 years ago

Solved


Anagram
Given two strings, check whether they're anagrams to each other or not.

5 years ago

Solved


Fault in our Stars - 02
Create a window pattern with h-horizontal bars and v-vertical bars. For example, for h=4,v=4 '**********' '* ...

5 years ago

Solved


Hanging cable - 02
previous problem - <https://www.mathworks.com/matlabcentral/cody/problems/45373-hanging-cable-01> The height of the poles...

5 years ago

Solved


Hanging cable - 01
The height of the poles is h the length of the cable is l u need to find the minimum distance between the poles whic...

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

5 years ago

Solved


Find the missing numbers.
Total *N* numbers are in the series of natural numbers ( *1,2,3,...,N* ). The input is an array (unsorted) of those natural num...

5 years ago

Solved


Accessing value of variable whose name is stored in another variable as string.
Accessing value of variable whose name is stored in another variable as string. for example: var1=n; var2='var1'; %Assigning...

5 years ago

Solved


Get a new matrix by mapping each element of an arbitrary-sized input matrix using lookup table
A is a matrix of any size and dimension. Each element of matrix A belongs to the set S of natural numbers up to N. B is a vector...

5 years ago

Solved


Find the mean of a 2-D matrix after excluding elements of specified sub-matrix
You need to find the mean of a 2-D matrix after excluding elements which form an inner sub-matrix. e.g. If the input 2-D matrix ...

5 years ago

Load more