Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


Bruh
Return 'bruh'.

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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 ]

circa 6 anni fa

Risolto


modulus of a number
find the modulus of a given number

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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;

circa 6 anni fa

Risolto


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]

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Carica altro