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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


Negative Infinity
Round the given array a towards negative infinity.

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


Positive Infinity
Round the array a towards positive infinity

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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]

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

A résolu


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

presque 9 ans il y a

Charger plus