Replicate elements in vectors (★★★)
(copy of Prob 867)
Replicate each element of a row vector (with NaN) a constant number of times. Examples
n=2, A=[1 2...
2 months ago
Solved
Remove the row average (★★★)
(copy of Prob. 963)
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solut...
Doubling elements in a vector (★★)
(copy of prob. 1024)
Given the vector A, return B in which all numbers in A are doubling. So for:
A = [ 1 5 8 ]
t...
2 months ago
Solved
Ordered pairs of integers (I, J).
Write a MATLAB function that calculates the number of ordered pairs of integers (I, J) that can be formed satisfying the conditi...
Find an inscribed square on a closed curve
Here's an unproven conjecture from geometry: Every simple closed curve in a plane contains all four vertices of some square.
...