Community Profile

# fluid

41 total contributions since 2017

View details...

Contributions in
View by

Solved

Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

environ 2 mois ago

Is there a function alternative to get array/matrix/cell elements?
Your question is something like this: How can I index a MATLAB array returned by a function without first assigning it to a lo...

2 mois ago | 1

Solved

Uniform binary crossover
Given two binary vectors, return the two children by combining the genes of them using a binary crossover mask. More informat...

3 mois ago

Solved

Determine if input is a valid AHP evaluation matrix
Input is a matrix. Output is a true or false statement (1 or 0). Return true if input is a valid Analytic Hierarchy Process eval...

3 mois ago

Solved

Projector Matrix
Write a function to determine whether or not the matrix is a projector. Projector matrices are defined as P^2 = P.

3 mois ago

Solved

Nilpotent matrix
Check if matrix A is <http://mathworks.com/ nilpotent>.

3 mois ago

Solved

Orthonormal matrix
You decide whether any given matrix is an orthonormal matrix or not. If each column in a matrix is perpendicular to the other...

3 mois ago

Solved

Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

3 mois ago

Solved

Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

3 mois ago

Solved

System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

3 mois ago

Solved

Linear system of equations
Solve the system of equations in three variables.

3 mois ago

Solved

Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

3 mois ago

Solved

Column norms of a matrix
Given a matrix M, return a vector y such that for each k y(k)=norm(M(:,k)) (y(k) is the Euclidean norm of the k-th col...

3 mois ago

Solved

Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

3 mois ago

Solved

Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

3 mois ago

Solved

Find the peak 3n+1 sequence value
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...

3 mois 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...

3 mois ago

Solved

Euler–Mascheroni constant
Approximate the Euler-Mascheroni constant using the series representation gamma_n=\sum_{k=1}^{n} [1/k-ln(1+1/k)] Calculat...

3 mois ago

Solved

Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

3 mois ago

Solved

Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

3 mois ago

Solved

<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

3 mois ago

Solved

Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

6 mois ago

Solved

Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

environ un an ago

Solved

Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

environ un an ago

Solved

Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

environ un an ago

Solved

Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

environ un an ago

Solved

Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

environ un an ago

Solved

Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

environ un an ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

environ un an ago

Solved

Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

environ un an ago