Gelöst


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

mehr als 5 Jahre vor

Gelöst


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

mehr als 5 Jahre vor

Gelöst


Bruh
Return 'bruh'.

mehr als 5 Jahre vor

Gelöst


Remove All elements less than 5
Given an input vector x, remove all elements of x less than 5 . Example: Input x = [ 1 2 5 7 3 ] Output y is [ 5 7 ...

mehr als 5 Jahre vor

Gelöst


Convert decimal to hex as shown in test cases
Convert decimal to hex as shown in test cases.

mehr als 5 Jahre vor

Gelöst


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

mehr als 5 Jahre vor

Gelöst


Sum of integers numbers
Sum of the numbers from 1 to 100

mehr als 5 Jahre vor

Gelöst


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

mehr als 5 Jahre vor

Gelöst


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

mehr als 5 Jahre vor

Gelöst


Average Grade
Given a 1x5 vector presents the grades of a student on five tests. Calculate the average grade of that student.

mehr als 5 Jahre vor

Gelöst


Convert degrees to radians
Given input in degrees, output to radians

mehr als 5 Jahre vor

Gelöst


07 - Common functions and indexing 5
Create the vector _lin_: <<http://samle.dk/STTBDP/Assignment1_7e.png>> (the integers from 1 to 20) Make every other val...

mehr als 5 Jahre vor

Gelöst


Vector Magnitude Calculator
'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

mehr als 5 Jahre vor

Gelöst


Conversion from hours to mili sec
Convert given input in hours to mili seconds

mehr als 5 Jahre vor

Gelöst


Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

mehr als 5 Jahre vor

Gelöst


modulus of a number
find the modulus of a given number

mehr als 5 Jahre vor

Gelöst


Basic commands - Greatest common divisor
Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

mehr als 5 Jahre vor

Gelöst


Generate vector according to sign of vector
Generate vector according to sign of vector Example: If A=[-2 0 5] then output must be[-1 0 1] meaning that for negative n...

mehr als 5 Jahre vor

Gelöst


Evaluate Polynomial
Given a polynomial equation coefficients in a vector p, you have to return its value at x. Example: For inputs p and x ...

mehr als 5 Jahre vor

Gelöst


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

mehr als 5 Jahre vor

Gelöst


Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.
--------------- A= [ 2 6 -3 7 12 0 -12 5 1] --------------- B= [12 7 1 6 2 0 5 -3 ...

mehr als 5 Jahre vor

Gelöst


Tiling a matrix
Given a matrix and a number of columns, replicate matrix in a single row

mehr als 5 Jahre vor

Gelöst


Parallel vectors
Return true or false depending on whether 2 vectors are parallel or not. Vectors can be 2 or 3 dimensional. The origin is not c...

mehr als 5 Jahre vor

Gelöst


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

mehr als 5 Jahre vor

Gelöst


Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:
A = [1 2 3 4 5 6] ----------- B = [0 0 0 0 0 0 1 2 3 0 0 4 5 6 0 0 0 0 0 0]

mehr als 5 Jahre vor

Gelöst


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

mehr als 5 Jahre vor

Gelöst


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

mehr als 5 Jahre vor

Gelöst


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

mehr als 5 Jahre vor

Gelöst


Append two matrix as shown below example
Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

mehr als 5 Jahre vor

Gelöst


Basic Quadratic Equation
Create the equation: y=(3x)^2+(5x)+35 and compute y for various values of x

mehr als 5 Jahre vor

Mehr laden