Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

alrededor de 5 años hace

Resuelto


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

alrededor de 5 años hace

Resuelto


Square a Number
Given an input x, return y, which is equal to the square of x.

alrededor de 5 años hace

Resuelto


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

alrededor de 5 años hace

Resuelto


Min of a Matrix
Return the minimum value in the given matrix.

alrededor de 5 años hace

Resuelto


Square root of a number
Write a code that will output the square root of x.

alrededor de 5 años hace

Resuelto


Row sum

alrededor de 5 años hace

Resuelto


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

alrededor de 5 años hace

Resuelto


Summy's even sum

alrededor de 5 años hace

Resuelto


Problem for beginners
M is a nxm matrix. Swap the fist and the second last column with eachother. X=[1 2 3;4 5 6;7 8 9] Y=[2 1 3;5 4 6;8 7 9]

alrededor de 5 años hace

Resuelto


Problem for beginners
Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

alrededor de 5 años hace

Resuelto


Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

alrededor de 5 años hace

Resuelto


Simple Matrix
Make the following matrix without typing it in one by one. [1 2 3; 2 4 6; 4 8 12] x=[1 2 3].

alrededor de 5 años hace

Resuelto


Box
Give the volume of a box, x is equal to the body diagonal.

alrededor de 5 años hace

Resuelto


Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

alrededor de 5 años hace

Resuelto


Square
X is a number, write a code, where Y should be the square of X.

alrededor de 5 años hace

Resuelto


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

alrededor de 5 años hace

Resuelto


Matrix problem for beginners
Make a matrix [0,0,0;1,1,1;2,2,2]. X=[0,1,2]

alrededor de 5 años hace

Resuelto


Matrix for beginners
Multiply x and y elemwise.

alrededor de 5 años hace

Resuelto


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

alrededor de 5 años hace

Resuelto


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

alrededor de 5 años hace

Resuelto


Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

alrededor de 5 años hace

Resuelto


Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

alrededor de 5 años hace

Resuelto


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

alrededor de 5 años hace

Resuelto


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

alrededor de 5 años hace

Resuelto


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

alrededor de 5 años hace

Cargar más