Solved


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

ungefär 6 år 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...

ungefär 6 år 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: ...

ungefär 6 år 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 ...

ungefär 6 år 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...

ungefär 6 år 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...

ungefär 6 år 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.

ungefär 6 år 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...

ungefär 6 år 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...

ungefär 6 år 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...

ungefär 6 år 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...

ungefär 6 år 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...

ungefär 6 år 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 ...

ungefär 6 år 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...

ungefär 6 år 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...

ungefär 6 år 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 ...

ungefär 6 år 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...

ungefär 6 år 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...

ungefär 6 år 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...

ungefär 6 år 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...

ungefär 6 år 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...

ungefär 6 år ago

Solved


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

ungefär 6 år 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 ...

ungefär 6 år 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, ... ...

ungefär 6 år 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: ...

ungefär 6 år 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,...

ungefär 6 år 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...

ungefär 6 år 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...

ungefär 6 år 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, ...

ungefär 6 år ago

Solved


Not square-free number sequence
<http://oeis.org/A013929 Not square-free numbers> are all positive integers divisible by a square greater than one: 4, 8, 9, 12,...

ungefär 6 år ago

Load more