Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


Potential Energy
Calculate the potential energy of a rock.

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


Equate
Equate y to x

etwa 11 Jahre vor

Gelöst


calculate Compound Intrest
Calculate Compound Intrest for given data

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


factorial of a number x
Factorial of a number x

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Mehr laden