Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...
Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').
4年弱 前
解決済み
Find Min and Max Differences in a Vector
Given an array of integers, return the absolute largest and smallest (non zero) difference between any two numbers in the array....
4年弱 前
解決済み
Determine if all elements are odd
Given an array, return true if all of the elements are odd.
ex.
x = [3 4 1]
allOdd(x)
ans = false
ex.
x = [3 5 7;
5 9...
4年弱 前
解決済み
Number of problems
No, you don't read it wrong: this assignment is to return the number of this problem (and not the problem of this number).
Where is the number that you want to find?
For a given matrix A, find where the input number x appears.
Do this task by returning the vector which contains the row and th...
Flipping a Matrix
Flipping matrix up and down.
If a central row is exists, leave it, and flip remaining rows.
Example
Mat = magic(3)
...
4年弱 前
解決済み
Alternate elements!
Write a function that combines two lists by alternating the elements, e.g. ['a','b','c'], ['1','2','3'] → 'a1b2c3'.
4年弱 前
解決済み
Quadratic equation
given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...
4年弱 前
解決済み
Electrical Diode Current Calculation
In engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instanc...
4年弱 前
解決済み
Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change.
Example:
Input ...
4年弱 前
解決済み
sum of ASCII
Given a string x, return the sum of all ASCII numbers of all characters.
for example, if x='lala' ('l'-> 108, 'a'->97) then y...
Odd times even numbers in a matrix
First count the number of odd numbers in x, then the number of even. Return their product.
example:
x = [1 2]
One odd ...
Uniform binary crossover
Given two binary vectors, return the two children by combining the genes of them using a binary crossover mask.
More informat...
4年弱 前
解決済み
Reverse Concatenation
Suggest methods to form a Matrix after deleting one of the input's elements.
Input should be element's position and output shou...