Community Profile

# Hamza Maqbool

##### Last seen: 26 dagen ago
1.257 total contributions since 2020

View details...

Contributions in
View by

Solved

Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

26 dagen ago

Solved

Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

7 maanden ago

Solved

All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

7 maanden ago

Solved

Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

7 maanden ago

Solved

Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

7 maanden ago

Solved

Free passes for everyone!
_Simply return the name of the coolest numerical computation software ever_ *Extra reward* (get a _freepass_): Once a mont...

7 maanden ago

Solved

given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

7 maanden ago

Solved

Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

7 maanden ago

Solved

Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

7 maanden ago

Solved

Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

7 maanden ago

Solved

surface of a spherical planet
you just discovered its circumference, that is the input.

7 maanden ago

Solved

Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

7 maanden ago

Solved

Calculate the sum of two numbers. Example input = [2 3] output = 5

7 maanden ago

Solved

Rate of event occurence: find percentiles of the distribution (for smallish rates)
*In this problem you need to find the 5th and 95th percentiles of a Poisson distribution defined by parameter _μ_ (the mean rate...

7 maanden ago

Solved

Mean = Standard Deviation
Create a series with following properties; # All of the members should be positive integer # Mean of the series should be in...

7 maanden ago

Solved

Histogram of histogram
Histogram of histogram (HoH) is a useful measure concerning the distribution of random data, which has diverse applications in d...

7 maanden ago

Solved

Eliminate Outliers Using Interquartile Range
Given a vector with your "data" find the outliers and remove them. To determine whether data contains an outlier: # Identi...

7 maanden ago

Solved

Cumulative probability of finding an unlikely combination
This is a supplemental problem to the <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition CryptoMath> ...

7 maanden ago

Solved

Probability of red tulips (at both ends of a row)
I planted tulip bulbs in a row on my flower bed. I thought that I had planted white tulips all. However, later, it turned out t...

7 maanden ago

Solved

Compute Area from Fixed Sum Cumulative Probability
In Matlab the code v = rand(1,3); v = v/sum(v); is sometimes suggested as a convenient means of generating three rando...

7 maanden ago

Solved

Probabilities - More brains than luck
This problem is related to <http://it.mathworks.com/matlabcentral/cody/problems/596-more-luck-than-brains Problem 596. More luck...

7 maanden ago

Solved

Test Driven Solution - Probability Problem 3
*Problem:* Without any Cody cheats, write code that passes the test suite. *Hint:* The test suite gets samples from the proba...

7 maanden ago

Solved

Test Driven Solution - Probability Problem 2
*Problem:* Without any Cody cheats, write code that passes the test suite. *Hint:* The test suite gets samples from the proba...

7 maanden ago

Solved

Test Driven Solution - Probability Problem 1
*Problem:* Without any Cody cheats, write code that passes the test suite. *Hint:* The test suite gets samples from the proba...

7 maanden ago

Solved

If you prick us, do we not bleed?
While doing some quick sewing to fix up your child's Halloween costume, you accidentally jab your finger with the needle. Refle...

7 maanden ago

Solved

Simulating the selection of a state with given probabilities
Lets say we have 3 different states [1,2,3] with the probabilities of occurrences of each state is given as [0.5 0.2 0.3]. Which...

7 maanden ago

Solved

What are the odds?
Two numbers, A and B are drawn randomly and uniformly on [-R,R]. What is the probability that A*B < A+B. Your function should ...

7 maanden ago

Solved

Probability of Choosing a Red Ball
Given two jars of red and blue balls, find the probability of choosing a red ball from Jar 1 after going through the steps. ...

7 maanden ago

Solved

Throwing Dice - Will You Be Eaten By The Dragon?
You and a dragon have agreed to let dice rolls determine whether it eats you or not. The dragon will roll a single die, of x ...

7 maanden ago

Solved

Unique dice configurations
Given a number of dice N and the number of sides on each die S, write a MATLAB function that will output how many unique permuta...

7 maanden ago