已解决


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

5 years 前

已解决


Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

5 years 前

已解决


Add two numbers
Add two numbers (For beginners)

5 years 前

已解决


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

5 years 前

已解决


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

5 years 前

已解决


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

5 years 前

已解决


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

5 years 前

已解决


Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

5 years 前

已解决


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

5 years 前

已解决


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

5 years 前

已解决


Oh Zero Zero Zero!!!
Hello all, So you have to find the largest section of zeros in a vector and then find the length of those zeros and there start...

5 years 前

已解决


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

5 years 前

已解决


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

5 years 前

已解决


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

5 years 前

已解决


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

5 years 前

已解决


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

5 years 前

已解决


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

5 years 前

已解决


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

5 years 前

已解决


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

5 years 前

已解决


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

5 years 前

已解决


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

5 years 前

已解决


Join Strings with Multiple Different Delimiters
The idea is to form the string S by interleaving the elements of a cell array of strings DELIMITER and another cell array of st...

5 years 前

已解决


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

5 years 前

已解决


Alternately upper-lower case
Modify the string to alternate between upper and lower case. For example, s='achyuta' output='AcHyUtA'

5 years 前

已解决


Free passes for everyone!
_Simply return the name of the coolest numerical computation software ever_ *Extra reward* (get a _freepass_): Once a mont...

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

5 years 前

已解决


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

5 years 前

已解决


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

5 years 前

加载更多