Risolto


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Concatenate two strings
Its very easy. Just concatenate two strings.

quasi 10 anni fa

Risolto


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

quasi 10 anni fa

Risolto


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

quasi 10 anni fa

Risolto


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

quasi 10 anni fa

Risolto


Negative Infinity
Round the given array a towards negative infinity.

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

quasi 10 anni fa

Risolto


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

quasi 10 anni fa

Risolto


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

quasi 10 anni fa

Risolto


Counting the Grand Primes
A grand prime pair is a pair of primes, p1 and p2=p1+1000, such that both numbers are prime. Like a twin prime pair, where the d...

quasi 10 anni fa

Risolto


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Back to basics 2 - Function Path
Covering some basic topics I haven't seen elsewhere on Cody. Given a string that is the name of a MATLAB function, return a s...

quasi 10 anni fa

Risolto


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

quasi 10 anni fa

Risolto


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

quasi 10 anni fa

Risolto


Positive Infinity
Round the array a towards positive infinity

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Determine the square root
Determine the square root of the value the user has entered, n.

quasi 10 anni fa

Risolto


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

quasi 10 anni fa

Risolto


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

quasi 10 anni fa

Risolto


Max of a Vector
Write a function to return the max of a vector

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

quasi 10 anni fa

Risolto


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

quasi 10 anni fa

Risolto


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

quasi 10 anni fa

Carica altro