Community Profile

# Hamza Maqbool

##### Last seen: 15 days 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.

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

2 months ago

Solved

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

2 months 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];

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

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

2 months ago

Solved

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

2 months 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!

2 months 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

2 months 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; ...

2 months ago

Solved

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

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

2 months ago

Solved

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2 months ago