Solved


Compute next 1000-day birthday milestone
Given a birthdate in DD-MMM-YYYY format, compute the next 1000-day birthday milestone. For example, Abraham Lincoln was born on ...

7 years ago

Solved


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

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

7 years ago

Solved


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

7 years ago

Solved


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

7 years ago

Solved


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

7 years ago

Solved


Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

7 years ago

Solved


Transposition as a CIPHER
This all about transcripting a text message. If the input string is: *s1 = 'My name is Sourav Mondal'*, then the output is: *s2...

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

7 years ago

Solved


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

7 years ago

Solved


deconvolution
* Suppose there is a vector v like [1 0 0 -1], representing polynomial coefficients. * In this example, the polynimial is 1*x^3...

7 years ago

Solved


Sort (high on middle, low on ends)
Sort the vector of numbers in order low-high-low. Even numbers appear in ascending order on the left and odd numbers appear in d...

7 years ago

Solved


count to vector
Return a matrix of numbers of dimension K by N, where K = prod(v), and N=length(v). The rows count from a vector of ones up to v...

7 years ago

Solved


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

7 years ago

Solved


Make a diamond
Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond. No toolbox funct...

7 years ago

Solved


Simple return on investment
Assume you have some money and want to invest all your money to stock market. You randomly select a stock and invest all your mo...

7 years ago

Solved


Generate pi using logarithm
Generate pi using logarithm

7 years ago

Solved


Calculate the nth Fibonacci number USING 'Golden Ratio' concept
f = [1 1 2 3 5 8 13 ...] If n=6, f(6)=8

7 years ago

Solved


Creating a s-function for RTW
I need to create a simulink block that will behave differently depending on whether I am simulating the model or building code. ...

7 years ago

Solved


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

7 years ago

Solved


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

7 years ago

Solved


Decimal Comparison
*Background* A utility of particular interest to Cody and other MATLAB ventures is comparing the equality of two numbers. In ...

7 years ago

Solved


I've got the power! (Inspired by Project Euler problem 29)
Consider all integer combinations of a^b and b^a for the integer values 2 ≤ a ≤ 4 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16,...

7 years ago

Solved


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

7 years ago

Solved


N-th digit of Pi
Give the N-th digits of Pi Input = 1 => Output = '1' Input = 1:10 => Output = '1415926535' Input = [11:15 25:35] => Out...

7 years ago

Solved


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

7 years ago

Solved


Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

7 years ago

Solved


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

7 years ago

Solved


Pizza value using expression with parentheses
Pizza prices are typically listed by diameter, rather than the more relevant feature of area. Compute a pizza's value (cost per ...

7 years ago

Solved


Lightning strike distance: Writing a function
Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

7 years ago

Load more