Solved


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

9 years ago

Solved


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

9 years ago

Solved


Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n. Example x= [ 1 2 3...

9 years ago

Solved


Negative Infinity
Round the given array a towards negative infinity.

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


Positive Infinity
Round the array a towards positive infinity

9 years ago

Solved


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

9 years ago

Solved


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

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

9 years ago

Solved


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

9 years ago

Solved


Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15

9 years ago

Solved


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

9 years ago

Solved


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

9 years ago

Solved


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

9 years ago

Solved


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

9 years ago

Solved


Find the area!
Find the area of a medium Dominos pizza

9 years ago

Solved


Get the array of sum for three consecutive numbers in an array
Get the array of sum, for three consecutive numbers in an array. if Input 'x' does not have at-least 3 elements then 'y' shou...

9 years ago

Solved


Vertically stack two vectors
Stack two vectors on top of each-other so that... if A = [1 5 3] and B = [8 6 4] then C = [1 5 3 ; 8 6 4]

9 years ago

Solved


Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

9 years ago

Solved


Multiplying Vectors 101
Make a vector from 1 to x then multiply the sum of that vector by 2.

9 years ago

Solved


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

9 years ago

Solved


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

9 years ago

Solved


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

9 years ago

Load more