Solved

Stairs

Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

6 months ago

Solved

Square root

Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

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

6 months ago

Solved

Cell joiner

You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

6 months ago

Solved

Characterize fluid flow in a pipe as to laminar or turbulent

In fluid mechanics, characterizing the flow in a pipe is essential to predicting its behavior. The flow pattern can either be la...

6 months ago

Solved

Count the number of folds needed to pack a large sheet

In a certain paper factory, large sheets of paper are being made every day. Before sending the sheets for shipment, they have to...

6 months ago

Solved

How to find the position of an element in a vector without using the find function

Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

6 months ago

Solved

Is it a number?

Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

6 months ago

Solved

The Goldbach Conjecture

The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

6 months ago

Solved

Pi Digit Probability

Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

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

6 months ago

Solved

vector to string

Determine what the ASCII characters spell out. Example: input = [ 72 73 71 72] output = 'HIGH'

6 months ago

Solved

Prime number check

One way to see if a number x is prime is to compute the remainders obtained when dividing x by all integers from 2 to √(x). If x...

6 months ago

Solved

Television Screen Dimensions

Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

6 months ago

Solved

Return the 3n+1 sequence for n

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

6 months ago

Solved

Find the sum of the elements in the "second" diagonal

Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

6 months ago

Solved

Reindex a vector

You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

6 months ago

Solved

Divide by 4

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

6 months ago

Solved

Unit Matrix

Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

6 months ago

Solved

Find the longest sequence of 1's in a binary sequence.

Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

6 months ago

Solved

Sum of series III

What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

7 months ago

Solved

Sum of series II

What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

7 months ago

Solved

Sum of series I

What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

7 months ago

Solved

Number of Circles in a Number

Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

7 months ago

Solved

First N Perfect Squares

*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

7 months ago

Solved

Is My Wife Wrong?

Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

7 months ago

Solved

Mode

Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

7 months ago