Resuelto


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

alrededor de 9 años hace

Resuelto


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

alrededor de 9 años hace

Resuelto


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

alrededor de 9 años hace

Resuelto


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

alrededor de 9 años hace

Resuelto


Building matrices
If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

alrededor de 9 años hace

Resuelto


Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

alrededor de 9 años hace

Resuelto


Solve t^(a*x^2+b*x+c)=s
Solve t^(a*x^2+b*x+c)=s. Return x vector as result. Example a=1, b=2, c=1, t=3, s=15. Result x(1)= 0.5700 x(2)=-2.5700 H...

alrededor de 9 años hace

Resuelto


Find product of eigenvalues of n*n magic matrix.
Find product of eigenvalues of n*n magic matrix. Example n=3 Matrix= [ 8 1 6; 3 5 7; 4 ...

alrededor de 9 años hace

Resuelto


merge two matrices together in one matrix
a= [1 2 3 4]; b=[5 6 7 8]; take the first column from matrix (a)and (b)then insert them in matrix (c) respectively, and so on;...

alrededor de 9 años hace

Resuelto


'Repeat!'
if matrix x=[1 2;3 4] y should be [1 2 1 2; 3 4 3 4; 1 2 1 2; 3 4 3 4;............],repeat n times! try this!

alrededor de 9 años hace

Resuelto


0, 2, 0, -2, 0, 2, 0, -2, ...
Generate the first n terms of a periodic sequence defined as f(x) = 0, 2, 0, -2, 0, 2, 0, -2, ..., for x = 1, 2, 3, 4, 5, 6...

alrededor de 9 años hace

Resuelto


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

alrededor de 9 años hace

Resuelto


Spiral Matrix
for a given integer n>=3, generate a matrix of nxn such that the value n^2 is at bottom left and its decreasing towards center ...

alrededor de 9 años hace

Resuelto


Negative Infinity
Round the given array a towards negative infinity.

alrededor de 9 años hace

Resuelto


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

alrededor de 9 años hace

Resuelto


Lightning strike distance: Writing a function
Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

alrededor de 9 años hace

Resuelto


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

alrededor de 9 años hace

Resuelto


Sum of digits of powers of 2
Given n, first, calculate the number 2^n. Then, sum the digits that comprise that number. For example: Input: n = 7 2^n = ...

alrededor de 9 años hace

Resuelto


Reverse digits of a number
Reverse digits of a number. For example, return *321* for the input *123* . The left-hand zeros can be discarded. For exam...

alrededor de 9 años hace

Resuelto


Vector Multiplication
Vector Multiplication of three matrix as shown in test cases.

alrededor de 9 años hace

Resuelto


Calculate correlation.
There are two data. y1=[0 1 2 3 4]' y2=[2 3 4 5 6]' We can see positive relationship between y1 and y2. The relations...

alrededor de 9 años hace

Resuelto


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

alrededor de 9 años hace

Resuelto


Find the mode of the given input
Find the statistical <http://en.wikipedia.org/wiki/Mode_(statistics)/ mode> of the given input. Example: If X is matr...

alrededor de 9 años hace

Resuelto


Find the rank of a matrix
Determine the rank of a matrix without using the MATLAB function of the same name.

alrededor de 9 años hace

Resuelto


Find 10's complement
Find 10's complement of a given number. An example is <http://electrical4u.com/9s-complement-and-10s-complement/ shown here>.

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

alrededor de 9 años hace

Resuelto


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

alrededor de 9 años hace

Resuelto


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

alrededor de 9 años hace

Resuelto


Find scalar product of two polynomials a and b, given as vector array.
Find scalar product of two polynomials given as vector array. Example a=[1 -1 2]; b=[2 4 1]; result=0

alrededor de 9 años hace

Cargar más