Feeds
已解决
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...
9 months 前
已解决
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...
9 months 前
已解决
Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...
9 months 前
已解决
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
9 months 前
已解决
the average value of the elements
Calculate the average value of the elements in the array
9 months 前
已解决
Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...
9 months 前
已解决
sum of non-primes
The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38 Find the sum of all the positive non-prime integers that do no...
9 months 前
已解决
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.
9 months 前
已解决
surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...
9 months 前
已解决
Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.
9 months 前
已解决
Given a number N, find the smallest prime P>N
Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.
9 months 前
已解决
area of an annulus
Given the diameter d of the inner circle of the annulus. Given length z of a chord of the outer circle of the annulus. This chor...
9 months 前
已解决
String Logic 19
Examples: 'DIG' --> 'I' 'IMPORTANT' --> 'MOTN' 'DEAL' --> 'EL' 'LIMB' --> 'IB' 'MOSTLY' --> 'OTY'
9 months 前
已解决
Laws of motion 4
Given the initial velocity 'u', final velocity 'v' and acceleration 'a', find the distance travelled.
9 months 前


