解決済み


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

7年以上 前

解決済み


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

7年以上 前

解決済み


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

7年以上 前

解決済み


Rounding
Round 10.67 and make 'y' equal to that number.

7年以上 前

解決済み


Add 7
Given an input variable x, output a variable y that is 7 greater than x. Example: Input x = 1 Output y is 8 Input ...

7年以上 前

解決済み


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

7年以上 前

解決済み


Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

7年以上 前

解決済み


Min of a Matrix
Return the minimum value in the given matrix.

7年以上 前

解決済み


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

7年以上 前

解決済み


Find max
Find the maximum value of a given vector or matrix.

7年以上 前

解決済み


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

7年以上 前

解決済み


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

7年以上 前

解決済み


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

7年以上 前

解決済み


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

7年以上 前

解決済み


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

7年以上 前

解決済み


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

7年以上 前

解決済み


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

7年以上 前

解決済み


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

7年以上 前

解決済み


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

7年以上 前

解決済み


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

7年以上 前

解決済み


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

7年以上 前

解決済み


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

7年以上 前

解決済み


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

7年以上 前

解決済み


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

7年以上 前

解決済み


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

7年以上 前

解決済み


Get the elements of diagonal and antidiagonal for any m-by-n matrix
In the problem <http://www.mathworks.com/matlabcentral/cody/problems/858-permute-diagonal-and-antidiagonal Problem 858. Permute ...

7年以上 前

解決済み


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

7年以上 前

解決済み


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

7年以上 前

解決済み


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

7年以上 前

解決済み


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

7年以上 前

さらに読み込む