Gelöst


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

18 Tage vor

Gelöst


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

18 Tage vor

Gelöst


convert matrix to single column
given any matrix, convert it to single column

18 Tage vor

Gelöst


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

18 Tage vor

Gelöst


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

18 Tage vor

Gelöst


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

18 Tage vor

Gelöst


Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

18 Tage vor

Gelöst


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

18 Tage vor

Gelöst


Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vertices of ...

18 Tage vor

Gelöst


Create a figure and plot data
Given two data vectors (x,y), open a new figure and plot the data. Return the figure handle.

18 Tage vor

Gelöst


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

18 Tage vor

Gelöst


Inner product of two vectors
Find the inner product of two vectors.

18 Tage vor

Gelöst


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...

18 Tage vor

Gelöst


Draw a '0' in a one matrix!

18 Tage vor

Gelöst


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not count...

18 Tage vor

Gelöst


Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

18 Tage vor

Gelöst


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

18 Tage vor

Gelöst


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

18 Tage vor

Gelöst


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

18 Tage vor

Gelöst


pressure to dB?
given x ratio of pressure, find corresponding y dB

18 Tage vor

Gelöst


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

18 Tage vor

Gelöst


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

18 Tage vor

Gelöst


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

18 Tage vor

Gelöst


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

18 Tage vor

Gelöst


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

18 Tage vor

Gelöst


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

18 Tage vor

Gelöst


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

18 Tage vor

Gelöst


Reverse a matrix
Its simple. You have to reverse a given matrix.

18 Tage vor

Gelöst


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

18 Tage vor

Gelöst


Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

18 Tage vor

Mehr laden