已解决


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

6 years 前

已解决


Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

6 years 前

已解决


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

6 years 前

已解决


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

6 years 前

已解决


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

6 years 前

已解决


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

6 years 前

已解决


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

6 years 前

已解决


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

6 years 前

已解决


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

6 years 前

已解决


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

6 years 前

已解决


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

6 years 前

已解决


Find remainder when x is divided by 3
Find remainder when x is divided by 3

6 years 前

已解决


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

6 years 前

已解决


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

6 years 前

已解决


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

6 years 前

已解决


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

6 years 前

已解决


Square a Number
Given an input x, return y, which is equal to the square of x.

6 years 前

已解决


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

6 years 前

已解决


select the primes of a vector
Find the prime numbers in a vector

6 years 前

已解决


Replace Negative(-) by 0 and positive by 1
In a given Matrix Replace all element having *Negative sign with 0* and *Positive elements with 1* .

6 years 前

已解决


true or false
if the matrix has a zero, return true. else, return false

6 years 前

已解决


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

6 years 前

已解决


Find the square of the sum of the digits of a number
If a number (n) is provided as an input, find the square of the sum of the digits of the number. Example If n = 21, the an...

6 years 前

已解决


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

6 years 前

已解决


Basics: Divide integers to get integer outputs in all cases
Divide integers a and b in such a way that output y is always an integer (in ceil manner)

6 years 前

已解决


Determinants
Given a square matrix(A), find the determinant(d). For example: A = [1,3;4,5] d = 1*5-4*3 = -7

6 years 前

已解决


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

6 years 前

已解决


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

6 years 前

已解决


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

6 years 前

已解决


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x = 123045; x_vec = [1 2 3 0 4 5]; I happened upon a trick ...

6 years 前

加载更多