A résolu


Pell numbers
Find the nth pell number <https://en.wikipedia.org/wiki/Pell_number>

environ 5 ans il y a

A résolu


Bell Triangle
Form the bell triangle upto nth bell number posotion; * if n=5 * y= [1 0 0 0 0; 1 2 0 0...

environ 5 ans il y a

A résolu


Frugal number
check whether n is a frugal number * a frugal number is a natural number in a given number base that has more digits than the...

environ 5 ans il y a

A résolu


Iccanobif numbers 1
There are a lot of problems in Cody that deal with Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21 etc...) so let's turn things arou...

environ 5 ans il y a

A résolu


Last non-zero digit
Given a number n, find the last non-zero digit of the factorial of that number. You need to take care of the large values of n....

environ 5 ans il y a

A résolu


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

environ 5 ans il y a

A résolu


Go to the head of the class!
You're given a matrix and a single number. If that number is in the matrix, reorder the matrix so that number is in the first r...

environ 5 ans il y a

A résolu


Must be in the front row...
You are given a matrix followed by a single number. Your object is to write a script that will shift the matrix around so that ...

environ 5 ans il y a

A résolu


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

environ 5 ans il y a

A résolu


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

environ 5 ans il y a

A résolu


A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...

environ 5 ans il y a

A résolu


Convert matrix to 3D array of triangular matrices
Given a 2D numeric array x in which each column represents the vectorized form of an upper triangular matrix, return a 3D array ...

environ 5 ans il y a

A résolu


Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...

environ 5 ans il y a

A résolu


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

environ 5 ans il y a

A résolu


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

environ 5 ans il y a

A résolu


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

environ 5 ans il y a

A résolu


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.

environ 5 ans il y a

A résolu


frame of the matrix
Given the matrix M, return M without the external frame.

environ 5 ans il y a

A résolu


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

environ 5 ans il y a

A résolu


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

environ 5 ans il y a

A résolu


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

environ 5 ans il y a

A résolu


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

environ 5 ans il y a

A résolu


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

environ 5 ans il y a

A résolu


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]

environ 5 ans il y a

A résolu


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

environ 5 ans il y a

A résolu


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

environ 5 ans il y a

A résolu


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

environ 5 ans il y a

A résolu


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

environ 5 ans il y a

A résolu


Matrix for beginners
Multiply x and y elemwise.

environ 5 ans il y a

A résolu


Please check the last row
We have data of matrix, that is input. That contains 2 or more rows and the last row should contain the average of each column,...

environ 5 ans il y a

Charger plus