Solved


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

6 months ago

Solved


Reverse the Matrix
Given a Matrix A, reverse it. Such that, last element of A becomes 1st and vice versa. for example: Input = [1 2 3;4 5 ...

6 months ago

Solved


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

6 months ago

Solved


Average valid values of arrays
Given a 1D array (column or row vector), compute the average of valid values. Valid values are defined via two thresholds: minVa...

6 months ago

Solved


Delete the column with all 0 !
Delete the column with all 0 data in a matrix(x). e.g. input x = 1 0 0 4 5 0 7 0 ...

6 months ago

Solved


Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.

6 months ago

Solved


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

6 months ago

Solved


true or false
if the matrix has a zero, return true. else, return false

6 months ago

Solved


Building matrices
If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

6 months ago

Solved


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

6 months ago

Solved


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

6 months ago

Solved


Negative matrix
Change the sign of all elements in given matrix.

6 months ago

Solved


MPS to MPH
Given the speed in miles per second, find the speed in miles per hour.

6 months ago

Solved


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

6 months ago

Solved


Factorial !
Calculate the factorial of a non-negative integer without using the built in function *factorial*

6 months ago

Solved


Ohm's Law
Well its Ohm's law... So V = IR! I will give two of the three values, such as V and I or I and R and you have to return th...

6 months ago

Solved


Solve The Equation
The coefficients of a system of equations are given in two vectors, x1 and x2. Write a function to solve the equation and return...

6 months ago

Solved


Subtraction
Subtract a from b.

6 months ago

Solved


Product of Array
Given an array of numbers. Get the product of the array.

6 months ago

Solved


Basic commands - amount of inputs
Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

6 months ago

Solved


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

6 months ago

Solved


only input
Return the output without writing any code into the function.

6 months ago

Solved


select the primes of a vector
Find the prime numbers in a vector

6 months ago

Solved


Signed Magnitude
For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

6 months ago

Solved


Can you reshape the matrix?
Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

6 months ago

Solved


The answer to life the universe and everything
Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case t...

6 months ago

Solved


the number of inputs
Find the number of the inputs of the function. example y = theinputnumber(x,k); function called theinputnumber has 2 in...

6 months ago

Solved


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

6 months ago

Solved


square root
Find the square root (y) of an input (x).

6 months ago

Solved


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

6 months ago

Load more