Solved

Find matching string from a list of strings

Write a function that returns a string that is a unique match (if it exists) of the string |inStr| from a list of strings |strLi...

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

2 years ago

Solved

bad colorimeter?

You have tested one good and one bad colorimeters with a colored solution at two path lengths of light and recorded transmittanc...

2 years ago

Solved

Find S-parameters of the circuit

Refer to <http://en.wikipedia.org/wiki/Scattering_parameters> for the information about the system of scattering parameters. ...

2 years ago

Solved

Basic electricity in a dry situation

⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ &#...

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

2 years ago

Solved

Leaking?

Graham's law states that the rate of effusion of a gas is inversely proportional to the square root of its molecular weight. A b...

2 years ago

Solved

You LOVES Matlab 41%

Given two strings, determine the percentage that one loves the other in the following way: YOU LOVES MATLAB there is 1 '...

2 years ago

Solved

Convert String to Morse Code

Convert a given string to international <http://en.wikipedia.org/wiki/Morse_code Morse Code> * Strings will only have [A-z], ...

2 years ago

Solved

capable husband?

* The prospective husband must pass a background check, * and *functions* faithfully, as suggested by <http://www.mathworks.com...

2 years ago

Solved

Einsteinium-253 decay

Radioactive Einsteinium-253 has a half-life of 1,768,608 seconds. Given 1000mg of Einsteinium-253 at t=0 days, how much is lef...

2 years ago

Solved

Acidity of vinegar and salts

Assuming: pH (potentia hydrogenii) = - log10(H+ ionic concentration in mol/Liter). For a buffer solution containing acetic acid ...

2 years ago

Solved

Multiply to the limit?

If y = 4*x*x/pi/pi then what is the ultimate limiting result of (1+y/1/1)(1+y/3/3)(1+y/5/5)(1+y/7/7)... ... within 1000*eps?

2 years ago

Solved

Closely related?

Given a function past_records() that will report blood sugar level of two twin brothers some random number of days ago. For exam...

2 years ago

Solved

Drying sweater?

* A sweater is revolving in a slow low power dryer and losing moisture at any moment at the constant rate 100% of its current mo...

2 years ago

Solved

count any radix?

given radix r(2-9), digts d(1-4), give all possible strings in sorted order. for example, if r=2, d=2, then output {'00' '01' '1...

2 years ago

Solved

swap sign sum & multiply castles

* It is an easy problem, if you know the answer. * Given a square matrix of NxN ordinary numbers. * Initially place N identi...

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

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

2 years ago

Solved

Mr. Pyramidad & Ms. Whissy Bolower

Businessman Mr. B. M. Pyramidad was drinking with his new girlfriend Ms. Whissy Bolower. He disclosed to her that he has an ille...

2 years ago

Solved

Scoring for oriented dominoes

Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

2 years ago

Solved

old wine in a new bottle?

* You have been given an apparently brand new unary function XXX, * that maps some ordinary scalars to scalars, * please gues...

2 years ago

Solved

speed vs size

The given string describes some MATLAB expressions such as 'pause(1)'. Compute its performance score = code size + run time in m...

2 years ago

Solved

Formatting currency numbers

Given a number, format it properly for textual display using the notation $xxx,xxx,xxx.xx. Assume that no more than two digits ...

2 years ago

Solved

Back to basics 24 - Symbolic variables

Covering some basic topics I haven't seen elsewhere on Cody. Given a string algebraic expression, return the symbolic variabl...

2 years ago

Solved

Count photos

Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

2 years ago

Solved

Converting Decimal to Binary

Given a decimal number that may include a fractional component, convert it into binary representation. The numbers you are given...

2 years ago

Solved

English to Pig Latin Translator

Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the wikipedia entry for Pig Latin): ...

2 years ago

Solved

Pig Latin to English Translator

Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the <http://en.wikipedia.org/wiki/Pi...

2 years ago

Solved

Fun Race

* Given two unary functions foo and goo. * Check whether foo(0) runs faster than goo(0). * Output 1 if foo is faster, otherwis...

2 years ago