A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


Potential Energy
Calculate the potential energy of a rock.

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


Equate
Equate y to x

environ 11 ans il y a

A résolu


calculate Compound Intrest
Calculate Compound Intrest for given data

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


factorial of a number x
Factorial of a number x

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

Charger plus