Modified Upper Matrix Mock
Given a vector v=[1 3 6 9 11], turn it into a matrix 'ramp' like so:
m=[1 3 6 9 11; 0 3 6 9 11; 0 0 6 9 11; 0 0 0 9 11; 0 0 0...
6 days ago
Solved
Insert certain elements into a vector.
We start with vector V. Some values W will be inserted into V, at positions U.
Say, |V| contains |[1 2 3 4 5]| and |W| is |[0...
6 days ago
Solved
Get the value 100
Knowing that 123-45-67+89=100, write a function that gives this result for any order of the digits in the input. Otherwise, the ...
6 days ago
Solved
realsmall
Please return the smallest positive number.
This is a little silly problem, but the solution has some funny properties...
6 days ago
Solved
Number Puzzles - 019
Borrowing the idea from Pascal Triangle, the following operation can be performed. Starting with an array of numbers from 1 to N...
Define the higher order function - foldl
Given a binary function f, a starting value a, and a list (row vector) xs of values, the higher order function foldl folds the f...
6 days ago
Solved
Sherlock Holmes: The Spy Problem
A guest at a party is a spy if this person is not known by any other guest, but knows all of them. There is at most one spy at a...
Orientation of a 3D coordinate frame
The orientation of a body-fixed frame {B} with respect to the world frame {W} is described by an SO(3) rotation matrix. Compute...
6 days ago
Solved
Where is 1?
There is a 3d matrix [A] that consist of many zeros and only one.
A=zeros(100,100,100);
i=randi(100);
j=randi(100);
k=randi(...