문제를 풀었습니다


Find Next Strictly Greater Element
Given an array of numbers, create a new array where each element represents the next strictly greater element to the right of th...

9개월 전

문제를 풀었습니다


Number Persistence
A number's persistence is the number of steps required to reduce it to a single digit by multiplying all its digits to obtain a ...

9개월 전

문제를 풀었습니다


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

9개월 전

문제를 풀었습니다


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

9개월 전

문제를 풀었습니다


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

9개월 전

문제를 풀었습니다


Normalizing a vector
Normalizing a set of values is an important operation in mathematics, consisting in affinely transforming a set of values in an ...

9개월 전

문제를 풀었습니다


Sort by absolute value
Given a list of numbers, arrange them in ascending order based on their absolute values. For example, for the list [-30, -5, 1...

9개월 전

문제를 풀었습니다


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

9개월 전

문제를 풀었습니다


Min-Max digit

9개월 전

문제를 풀었습니다


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

9개월 전

문제를 풀었습니다


End Digits

9개월 전

문제를 풀었습니다


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input is n=4 th...

9개월 전

문제를 풀었습니다


Replace with Lower
Given a list of integers, for each element, replace it with the minimum integer found in the sub-list to its strict right (exclu...

9개월 전

문제를 풀었습니다


Remove Adjacent Pairs
Given an array of integers where adjacent elements may be identical, your task is to remove these adjacent pairs. If removing on...

9개월 전

문제를 풀었습니다


Check if inputted variable is a string or a number
Check if a inputted variable is a number or a string, given a string input (i.e. '1' is 1 and thus a number, 'a' is a string).

9개월 전

문제를 풀었습니다


Replace 0 indices in array with 1's
Take a incoming vector, and replace 0's with ones

9개월 전

문제를 풀었습니다


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

9개월 전

문제를 풀었습니다


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

9개월 전

문제를 풀었습니다


Vector of numbers divisible by 3
* Input(n) - any integer * Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0 Examples: * n=6...

9개월 전

문제를 풀었습니다


Replace odd number in given matrix by zero
Replace the odd numbers in a given matrix with zero. Example A = [ 17 24 1 8 15 23 5 7 ...

9개월 전

문제를 풀었습니다


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

9개월 전

문제를 풀었습니다


LocateMembership | Membership of Matrix in another matrix
Let a and b be given by a = [ 2 1 1 1 1 2 1 1 1 1 2 1 1 1 1 2 4 0 0 0 ] b = [ 2 1 ...

9개월 전

문제를 풀었습니다


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

9개월 전

문제를 풀었습니다


Negative matrix
Change the sign of all elements in given matrix.

9개월 전

문제를 풀었습니다


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

9개월 전

문제를 풀었습니다


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

9개월 전

문제를 풀었습니다


Repeat The Components of Matrix
Repeat The components of a matrix so that the size of the output matrix is double to input matrix and components are repeated ne...

9개월 전

문제를 풀었습니다


Sort the vector with the given index
Given x = [1 2 4 8 17] and t = [1 3 2 5 4] then y = [1 4 2 17 8].

9개월 전

문제를 풀었습니다


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

11개월 전

문제를 풀었습니다


remove numbers from a string
check the given string for any numbers.in case one is found,remove it.but the two portions should be separated. if more than one...

11개월 전

더 보기