Feeds
已解决
Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.
3 days 前
已解决
The Case of the Missing Prototype – Check the Lab’s Logbook for Suspicious Late-Night Entries
After counting the fingerprints, you turn your attention to the security logbook.It records the entry hours (from 0 to 23) of ev...
8 days 前
已解决
The Case of the Missing Prototype - Count the Fingerprints Found at the Lab Door to Begin Your Investigation
You arrive at the Innovation Lab where the secret prototype was stolen. The door has been dusted for fingerprints, and a technic...
8 days 前
已解决
Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...
10 days 前
已解决
Rotate input square matrix 90 degrees CCW without rot90
Rotate input matrix (which will be square) 90 degrees counter-clockwise without using rot90,flipud,fliplr, or flipdim (or eval)....
10 days 前
已解决
Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...
10 days 前
已解决
Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...
10 days 前
已解决
subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.
10 days 前
已解决
Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...
10 days 前
已解决
Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...
10 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 ...
11 days 前
已解决
Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...
11 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 = ...
11 days 前
已解决
Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...
11 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 ...
11 days 前
已解决
Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...
11 days 前
已解决
Find Rows with Specift Properities
Delete rows with specific properites as following: Find rows that have a negative value in any element of the row and delete it...
11 days 前
已解决
Remove all the columns contains only zero
Remove the column from the matrix which has only zeros . Refer the Example below a= 1 0 3 0 23 0 56 0 1 ...
11 days 前
已解决
Find x rows where the sum of the numbers is the maximum
Find x rows where the sum of the numbers is the maximum. For example: when x is 2 and m is 2 3 5 0 2 3 5 5 6 0 9 4 then y =...
11 days 前
已解决
Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...
11 days 前
已解决
Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...
11 days 前
已解决
How to locate the position of an element in a vector without using the find function
(copy of prob 105 with test for find function) Write a function posX = *locatePos* (x,y) which returns the location o...
13 days 前
已解决
swap sign sum & multiply castles
It is an easy problem, if you know the answer. Given a square matrix of NxN ordinary numbers. Initially place N identical indi...
17 days 前
已解决
Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').
17 days 前
已解决
Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...
17 days 前
已解决
Remove a specific character with another
Remove any (-) dash sign with (_) underscore Ex = 'The-Journey-of-thoudsands-miles-starts-with-a-single-step' y = 'The_Jour...
17 days 前
已解决
Swap between first and last
The idea is to swap between first and last row Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...
17 days 前
已解决
Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...
17 days 前
已解决
Swap between columns
The idea is to swap between second and second last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...
17 days 前




