Divide polynomial p1 by p2.
Divide polynomial p1 by p2 given as vectors. Return result q and r vectors which corresponds the quotient and remainder of divis...
Calculate the values of a polynomial.
Calculate the values of a polynomial.Input parameter p - vector of polynomial coefficients, x - matrix of the argument values.
...
Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix:
1 2 3 ...
4年弱 前
解決済み
Pascal's triangle
<https://en.wikipedia.org/wiki/Pascal%27s_triangle>
if the order is: x = 3; the output will be:
output = [0 0 0 1 0 0 ...
4年弱 前
解決済み
sum all digits
input = 123456789, output = 1+2+3+4+5+6+7+8+9 = 45
concatenate the elements
you should concatenate the elements of a matrix in one dimensional array, for example if the input is
A = [1 2 3; 4 5 6; 7 ...
4年弱 前
解決済み
No more zeros
Given an array with zeros at the beginning or at the end, you should get the output without these zeros:
input = [zeros(5...