Feeds
已解决
Rainbow matrix
Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...
3 days 前
已解决
Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...
4 days 前
已解决
Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...
6 days 前
已解决
ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...
7 days 前
已解决
Union Jack Matrix
Create a matrix of odd dimensions that has ones on both diagonals and dividing the matrix into 4 quadrants, resembling a square ...
10 days 前
已解决
Create a square matrix with given conditions
Create a square matrix, M, which should be populated as follows: M = [ n^2 n * (n-1) n * (n-2) ... n * 2 n * ...
10 days 前
已解决
Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...
12 days 前
已解决
Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] is s...
12 days 前
已解决
Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...
14 days 前
已解决
Linear Motion 2
During testing in the desert, a remotely operated vehicle travels D kilometers over rough terrain. The testing takes place over...
17 days 前
已解决
Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...
17 days 前
已解决
Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...
17 days 前
已解决
Similar Triangles - find the height of the tree
Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...
19 days 前
已解决
Calculate the Distance to Source of Lightning
Lightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is...
19 days 前
已解决
Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...
20 days 前
已解决
Laws of motion 4
Given the initial velocity 'u', final velocity 'v' and acceleration 'a', find the distance travelled.
21 days 前
已解决
create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...
24 days 前
已解决
Form a square matrix from four square sub-matrices
Create a square matrix, y, from 4 square sub-matrices that will be constructed (x1, x2, x3, x4): y = [x1 x2; x3 x4]; ...
24 days 前
已解决
Make a diamond
Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond. No toolbox funct...
25 days 前
已解决
Find the next Fibonacci number
In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...
26 days 前
已解决
Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...
26 days 前
已解决
Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.
26 days 前
已解决
"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...
28 days 前
已解决
Get the elements of diagonal and antidiagonal for any m-by-n matrix
In the problem <http://www.mathworks.com/matlabcentral/cody/problems/858-permute-diagonal-and-antidiagonal Problem 858. Permute ...
1 month 前
已解决
Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...
1 month 前


