Solved


Find the definite integral of various linear functions
A definite integral had a minimum and maximum limit. When you solve this type of problem you must use both quad and the trapz fu...

11 months ago

Solved


Find the summation of factorial series
Factorial numbers are n! = 1*2*3....*n the series is 1!, 2!, 3!,........, n!

11 months ago

Solved


Looking for Squares
Need n squares that equal one square all together, none zero, none fractured. For example, calling squares(2) should output [16 ...

11 months ago

Solved


Grandpa's telescope
Two grandkids Dorothy and Benjamin are sharing a telescope made by their grandpa, who used an old lens of spectacles as the obje...

11 months ago

Solved


resistor ladder
* You have a bunch (an odd number N) of identical resistors (each R ohms), a good battery (V volts), and a high impedance voltme...

11 months ago

Solved


chance in percent for minimum K heads when a good coin is tossed N times?
For example, chance is 100% for minimum 0 heads when a coin is tossed 7 times. Chance is 50% for minimum 2 heads when a coin is...

11 months ago

Solved


Generalized N-Cards Problem
Preface: This is a generalized version of the problem I presented <http://www.mathworks.com/matlabcentral/cody/problems/271-n-ca...

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

11 months ago

Solved


Is this date a palindrome?emordnilap a etad siht sI
Take a MATLAB date number as input, and return true if the date is a palindrome, false if the date is not a palindrome. A date ...

11 months ago

Solved


Create a dictionary
The goal is to write a function that returns a dictionary from a list of words or phrases and their definitions. Here is an exam...

11 months ago

Solved


yet another flying fly (YAFF)
Same as the previous problem <http://www.mathworks.com/matlabcentral/cody/problems/203-fly-fly-away fly fly away> but now with *...

11 months ago

Solved


Reverse Boggle
Description In the classic Parker Brothers game Boggle, players find words from a 4x4 game board of letters. This exercise is t...

11 months ago

Solved


Mimic foldl in functional programming
Mimic the higher-order function |foldl| ( <http://en.wikipedia.org/wiki/Fold_%28higher-order_function%29 Wikipedia:Fold (higher-...

11 months ago

Solved


hanoi towers II
with 3 rods (1,2 & 3), the goal is to move a tower of n disks from rod #1 to rod #3. You can move disks only one by one, on the...

11 months ago

Solved


Find out the smallest number 9 times greater
What is the smallest natural number where the result of moving the digit on the far right to the front of the number is a number...

11 months ago

Solved


The Hacker Parole Problem
The hacker parole problem 100 hackers have been imprisoned, but have been given a way to get parole. Each of the 100 prisone...

11 months ago

Solved


Bullseye Matrix with Zeros
Inspired by Problem 18, create a bullseye matrix with the addition of padding equal to 0 between concentric rings. Matrices are ...

11 months ago

Solved


Roman to Integer Conversion
The idea behind this cody problem is to write a code that converts the Roman Numerals to Integers. A numeral system known as R...

11 months ago

Solved


Carmichael Function
Compute the carmichael function for the input.

11 months ago

Solved


Compute the total length of lines between all vertices of a regular polygon
Write a function to compute the total length of between all vertices of a regular polygon inscribed in a unit circle. For exampl...

11 months ago

Solved


Orthogonalize 3 column vectors using the Gram-Schmidt process
Use the Gram-Schmidt process to orthogonalize three linearly independent column vectors. Return three output column vectors that...

11 months ago

Solved


Write a code to implement the improved Euler's method to integrate a simple function
Euler's method approximates the solution to a differential equation as where . It's possible to improve on Euler's method by ...

11 months ago

Solved


Find the minimum element coprime to the rest in a set of 10 consecutive integers
In this video, Dr Barker argued that a set of 10 consecutive integers must have at least one integer coprime to the rest. For ex...

11 months ago

Solved


Calculating distance of lightning based on time delay
If we know the time delay between when we see lightning and hear thunder then we can calculate approximate distance(in meters) o...

11 months ago

Solved


finding vector pair with min angle between them
given a matrix with more than one row , compare row vectors of the given matrix and find the pair with the minumum angle between...

11 months ago

Solved


Counting the occurrences of a digit in a book
The printer has printed a book with 'p' pages. How many times did they use the character 'd'? In other words, how many times doe...

11 months ago

Solved


Pivot index
Let L be a vector of numbers. We are searching for the index n of the pivot element defined as follows: the dot product of the e...

11 months ago

Solved


Compress list
Given a non-empty list L of positif integers, compress the list so that only one occurrence is retained if two (or more) equal e...

11 months ago

Solved


Digits eliminate
Complete the function my_f(n,b) to return, for a given integer, the number obtained by removing the digits '0' and 'b'. If there...

11 months ago

Solved


Missing Number (arithmetic progression)
Given a list of integers forming an arithmetic progression (where the difference between consecutive elements is constant), your...

11 months ago

Load more