Solved


Prime Product
My professor has given a sequence of N numbers as a1, a2, ..., aN and asked me to find the smallest possible value of ai * aj su...

8 years ago

Solved


how many of the entries are positive?
Given x= sin(linspace(0,10*pi,100)), how many of the entries are positive?

8 years ago

Solved


Sum of unique multiples of 3 and 5
If we list all the natural numbers up to 15 that are multiples of 3 or 5, we get 3, 5, 6, 9, 10, 12 and 15. The sum of these mul...

8 years ago

Solved


Vector to 3-Column Matrix
Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

8 years ago

Solved


Crunch that matrix!
You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

8 years ago

Solved


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

8 years ago

Solved


Divide elements by sum of elements
In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...

8 years ago

Solved


Perfect square.
Determine if the input is a perfect square or not. Example - If input is 25, return 1. If input is 17, return 0.

8 years ago

Solved


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

8 years ago

Solved


Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

8 years ago

Solved


Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

8 years ago

Solved


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

8 years ago

Solved


Put two time series onto the same time basis
Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

8 years ago

Solved


Property dispute!
Two neighbors have rectangular plots of land A and B. The surveyors give you the coordinates of each. If they overlap, there is ...

8 years ago

Solved


Pattern Recognition 3 - Variable Unit and Array Length (including cell arrays)
You will be given various arrays, composed of numbers or strings, including cell arrays of strings. For this problem, the patter...

8 years ago

Solved


Crossing to Kissing - Untangle the Lines
Turn lines that cross into lines that kiss. You will be given two lines that cross at some point. Your job is to untangle the...

8 years ago

Solved


Pattern Recognition 2 - Known Unit Length, Various Array Length (including cell arrays)
You will be given various arrays, composed of numbers or strings, including cell arrays of strings. For this problem, the known ...

8 years ago

Solved


Pattern Recognition 1 - Known Unit Length
You will be given various arrays, composed of numbers or strings. For this problem, the known pattern unit length is three. Writ...

8 years ago

Solved


Self-similarity 3 - Every other pair of terms
Self-similar integer sequences are certain sequences that can be reproduced by extracting a portion of the existing sequence. Se...

8 years ago

Solved


Self-similarity 1 - Every other term
Self-similar integer sequences are certain sequences that can be reproduced by extracting a portion of the existing sequence. Se...

8 years ago

Solved


Self-similarity 2 - Every third term
Self-similar integer sequences are certain sequences that can be reproduced by extracting a portion of the existing sequence. Se...

8 years ago

Solved


Weighted Gold/Silver Standard
Building off of the <http://www.mathworks.com/matlabcentral/cody/problems/8045-gold-standard Gold Standard> and <http://www.math...

8 years ago

Solved


Gold/Silver Standard
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/8045-gold-standard Gold Standard> problem, suppose that yo...

8 years ago

Solved


Gold Standard
Gold has long been used as currency and a standard for currency, due to its inherent value and rarity. Historical data for gold ...

8 years ago

Solved


Return fibonacci sequence do not use loop and condition version 2
Calculate the nth Fibonacci number,return sequence Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... ...

8 years ago

Solved


Return fibonacci sequence do not use loop and condition
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

8 years ago

Solved


Twin Primes
Twin primes are pairs of primes that are immediately next to each other (difference of two). The lesser of twin primes are 3, 5,...

8 years ago

Solved


Mobius function
From <http://en.wikipedia.org/wiki/Möbius_function wikipedia>: For any positive integer n, define μ(n) as the sum of the prim...

8 years ago

Solved


Sphenic number sequence
<http://oeis.org/A007304 Sphenic numbers> are positive integers that are products of three distinct prime numbers: 30, 42, 66, 7...

8 years ago

Solved


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

8 years ago

Load more