解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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]

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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.

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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.

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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)

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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]

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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.

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

さらに読み込む