Resuelto


Beat the test suite if you can :)
Solve this problem based on clues in the test suite.

alrededor de 5 años hace

Resuelto


Display negative numbers
Given array,x, display all the negative numbers and display output as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

alrededor de 5 años hace

Resuelto


Shift elements of vector left
Shift elements of vector to the left. For ex. : Input_vec = [1 2 3 4 5] Output_vec = [2 3 4 5 1]

alrededor de 5 años hace

Resuelto


Calories in a slice of pizza?
The total calories C in a pizza is printed on its box. You know the angle A (degrees) of the slice you placed on your plate. Ple...

alrededor de 5 años hace

Resuelto


Matrix element wise multiplication
Take two incoming vectors, and multiply them element wise

alrededor de 5 años hace

Resuelto


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

alrededor de 5 años hace

Resuelto


Create sine function out of cosine
Please don't use sin(x) directly

alrededor de 5 años hace

Resuelto


Find minimum and maximum elements of an array
For a given array find minimum and maximum elements of an array and store minimum value in first index of output and maximum in ...

alrededor de 5 años hace

Resuelto


Find the sum of the largest two elements in a vector
With this one, you have to find the two largest elements in a vector and output the sum of those numbers.

alrededor de 5 años hace

Resuelto


De-primed
Write a function that will multiply every prime number in the array or matrix by two, leaving all other numbers the same, and re...

alrededor de 5 años hace

Resuelto


Check if a matrix is a palindrome in all directions
Check if a matrix is a palindrome both vertically and horizontally. You function will return *true* for |[1,2,1]| or |[2,7,2;...

alrededor de 5 años hace

Resuelto


Find the last digit
FInd the last digit of a given number. Given number is the input and output should be the last digit of that number.

alrededor de 5 años hace

Resuelto


Give prime Numbers upto n
You are given a input number x; print all the prime numbers less than equal to x.

alrededor de 5 años hace

Resuelto


Flipping a Matrix
Flipping matrix up and down. If a central row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...

alrededor de 5 años hace

Resuelto


create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

alrededor de 5 años hace

Resuelto


Swap the first and last columns (★★)
(copy of Prob 19) Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...

alrededor de 5 años hace

Resuelto


Resizing Matrices
Take an 4x3 matrix, and resize it to a 2x6 matrix

alrededor de 5 años hace

Resuelto


Create an array (n,n) where only diagonal elements are '1' and others are '0'
Create an array (n,n) where only diagonal elements are '1' and others are '0' EX: n = 3; then Resultant array would be [ 1 0...

alrededor de 5 años hace

Resuelto


Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)

alrededor de 5 años hace

Resuelto


Vector Element Multiplication
Take two incoming vectors, and output the element wise multiplication of the vectors.

alrededor de 5 años hace

Resuelto


Weighted average
Compute the weighted average Y, of the vector A, given the weight vector W. The weighted average is the sum of the dot produc...

alrededor de 5 años hace

Resuelto


UICBioE240 problem 1.7
Find the other two angles of a right triangle given the two of the sides. So if A = [1 1] B = [45 45]

alrededor de 5 años hace

Resuelto


Evened up (or not)
You will be provided with an array or matrix that contains various numbers, in addition to an evening variable, e, set to 1 or 0...

alrededor de 5 años hace

Resuelto


Create a block diagonal matrix
A block diagonal matrix is a square matrix that can be written as A = [a 0 0 0 0 b 0 0 0 0 c 0 ...

alrededor de 5 años hace

Resuelto


Vector to 3-Column Matrix
Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

alrededor de 5 años hace

Resuelto


row removal
Remove the nth row from input matrix M and return the resulting matrix in output N.

alrededor de 5 años hace

Resuelto


Replace 0 to NaN!
In given matrix A=[1 nan nan; 2 2 nan; nan nan 1]; replace NaN to 0. Use matrix A as a input.

alrededor de 5 años hace

Resuelto


Sum positive elements of matrix.
Calculate sum of positive elements of the matrix.

alrededor de 5 años hace

Resuelto


Find x in provided equation!
x^2-2*x+1=0 This polynomial can be expressed by using each term's coefficients, such as [1 -2 1]. Using the polynomial ...

alrededor de 5 años hace

Resuelto


Replace Negative(-) by 0 and positive by 1
In a given Matrix Replace all element having *Negative sign with 0* and *Positive elements with 1* .

alrededor de 5 años hace

Cargar más