Feeds
已解决
Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?
2 months 前
已解决
A Fiveless Factorial
Given a positive integer x, compute its factorial y, but exclude any muliplication by five if applicable.
2 months 前
已解决
Don't Sum a Five
Create a function that sums the first and last element of a muti-element vector unless the value of one of the elements is 5. Do...
2 months 前
已解决
Don't Include a Five (Part Two)
Given a vector A with at least one non-five, return vector B, with all fives excluded (not replaced by zeros).
2 months 前
已解决
High Five!
Write a function that takes a number x and returns y = 'High Five' if x is not equal to five. Return y = 'Denied' if the number ...
2 months 前
已解决
A Five Introduction
Write a function that takes a number x as an input and returns the same value as y, unless x = 5, in which case the function sho...
2 months 前
已解决
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...
2 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.
2 months 前
已解决
MatCAT - Reconstruct X from Its X-rays
Consider a matrix x x = [ 1 2 0 0 5 0 3 0 8 ] If we sum x along the rows we get row_sums = [3 5 11] ...
2 months 前
已解决
Matrix of Multiplication Facts
This is James's daughter again, sneaking into his Cody account. Thanks to your help in my math class last year, I did great! But...
2 months 前
已解决
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...
2 months 前
已解决
matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...
2 months 前
已解决
Convert binary numbers array into array of decimal numbers.
Convert binary numbers array into array of decimal numbers. Example x=[ 11001000 ; 11001001 ; 11001010 ; 11001011 ; 11001100 ;...
2 months 前
已解决
Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...
2 months 前
已解决
Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...
2 months 前
已解决
find the nth number (plus)
this problem is the harder version of Problem 61014. The numbers 2 and 7 are called lucky numbers, an integer containing only t...
2 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...
2 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;...
2 months 前
已解决
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
2 months 前
已解决
Calculate the average value of the elements in the array
Calculate the average value of the elements in the array
2 months 前
已解决
the average value of the elements
Calculate the average value of the elements in the array
2 months 前


