Feeds
已解决
Divisible by 6
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...
12 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...
12 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;...
12 months 前
已解决
Calculate the average value of the elements in the array
Calculate the average value of the elements in the array
12 months 前
已解决
the average value of the elements
Calculate the average value of the elements in the array
12 months 前
已解决
Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...
12 months 前
已解决
Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]
12 months 前
已解决
Determine the square root
Determine the square root of the value the user has entered, n.
12 months 前
已解决
Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...
12 months 前
已解决
Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...
12 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...
12 months 前
已解决
Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...
12 months 前
已解决
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
12 months 前
已解决
Divisible by 15
Write a function to determine if a number is divisible by 15. If a number is <http://www.mathworks.com/matlabcentral/cody/proble...
12 months 前
已解决
Divisible by 9
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...
12 months 前
已解决
Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...
12 months 前
已解决
Divisible by 5
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...
12 months 前
已解决
No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...
12 months 前
已解决
Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...
12 months 前
已解决
Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...
12 months 前
已解决
Divisible by 10
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...
12 months 前
已解决
Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...
12 months 前
已解决
Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input is n=4 th...
12 months 前


