Solved


first step for Huffman Coding (easy)
Given a string, you must sort the characters by occurrence (from lowest to highest). This step is necessary to generate a Huf...

10 years ago

Solved


Was ist denn los?
Nur für deutschsprechende Leute! Wie geht's? ...also gut, bis bald!

10 years ago

Solved


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

10 years ago

Solved


Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n. Example x= [ 1 2 3...

10 years ago

Solved


Make blocks of color
Given a (Nx3) sequence of RGB colors, I want to create a (numRowBlocks x numColBlocks x 3) image comprising (blockSize x blockSi...

10 years ago

Solved


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

10 years ago

Solved


Potential Energy
Calculate the potential energy of a rock.

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

10 years ago

Solved


Snakes on a plane
Given the dimensions of a 2-d plane, create a matrix where a "snake" of ones occupies the plane from top left to bottom right. ...

10 years ago

Solved


Maintain shape of logical-index mask
When using logical indexing into an array, MATLAB returns a vector output. For example, if A = magic(3); mask = logi...

10 years ago

Solved


Number of problems
No, you don't read it wrong: this assignment is to return the number of this problem (and not the problem of this number).

10 years ago

Solved


Number Persistence
A number's persistence is the number of steps required to reduce it to a single digit by multiplying all its digits to obtain a ...

10 years ago

Solved


Remove All elements less than 5
Given an input vector x, remove all elements of x less than 5 . Example: Input x = [ 1 2 5 7 3 ] Output y is [ 5 7 ...

10 years ago

Solved


check whether it is prime or not
Given a number,check whether it is prime or not. If prime output is true else false

10 years ago

Solved


Equate
Equate y to x

10 years ago

Solved


calculate Compound Intrest
Calculate Compound Intrest for given data

10 years ago

Solved


THE CALCULATOR OF LOVE
In honor of Valentine's Day, program a love calculator that figures out the percentage of compatibility between two people using...

10 years ago

Solved


How to add?
* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

10 years ago

Solved


Let's see how peculiar we can get
The task is to multiply two numbers. But do it in the most peculiar possible way.

10 years ago

Solved


Wilf-Zeilberger pairs
Take as inputs two functions _F_ and _G_, and two scalar values _n_ and _k_. Test whether the functions are candidates to be a W...

10 years ago

Solved


Remove NaNs and numbers adjacent to NaNs
The aim is to remove the elements before and after NaN occurrences inside a vector. For example: x = [6 10 5 8 9 NaN 23 1...

10 years ago

Solved


factorial of a number x
Factorial of a number x

10 years ago

Solved


Person of interest?
given a person_of_interest, what is his_name?

10 years ago

Solved


Implement a counter
Write a function that returns a function that counts the number of times it is invoked. Example: >> h = counter; >> h() ...

10 years ago

Solved


Return the Nth Output from an Input Command
*Description* Given _F_, a cell array whose first element is a function handle and subsequent elements are arguments, return ...

10 years ago

Solved


Vector Magnitude Calculator
'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

10 years ago

Solved


Alkane
Given a number, x, that is equal to the number of carbon atoms in an <http://en.wikipedia.org/wiki/Alkane alkane>, find, y, the ...

10 years ago

Solved


Possible Outcomes of American Roulette
The payout for American roulette can be calculated by: payout = (38/n)-1 where n is the number of squares the bet covers. ...

10 years ago

Solved


Two-output anonymous function?
Return a function handle that when applied to an input, it produces two outputs: the first is the same as the input, and the sec...

10 years ago

Solved


Create a vector
Create a vector from 0 to n by intervals of 2.

10 years ago

Load more