Gelöst


Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

mehr als 5 Jahre vor

Gelöst


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

mehr als 5 Jahre vor

Gelöst


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

mehr als 5 Jahre vor

Gelöst


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

mehr als 5 Jahre vor

Gelöst


Positive Infinity
Round the array a towards positive infinity

mehr als 5 Jahre vor

Gelöst


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

mehr als 5 Jahre vor

Gelöst


Equal to their cube
Tell me three real numbers that are equal to their cubes?

mehr als 5 Jahre vor

Gelöst


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

mehr als 5 Jahre vor

Gelöst


length of a vector
Find twice the length of a given vector.

mehr als 5 Jahre vor

Gelöst


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

mehr als 5 Jahre vor

Gelöst


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

mehr als 5 Jahre vor

Gelöst


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

mehr als 5 Jahre vor

Gelöst


reverse string
input='rama' output='amar'

mehr als 5 Jahre vor

Gelöst


kmph to mps
convert kilometer per hour to meter per second

mehr als 5 Jahre vor

Gelöst


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

mehr als 5 Jahre vor

Gelöst


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

mehr als 5 Jahre vor

Gelöst


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

mehr als 5 Jahre vor

Gelöst


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

mehr als 5 Jahre vor

Beantwortet
Counting the number of digits
no_of_digits = numel(num2str(abs(A)));

mehr als 5 Jahre vor | 0

Gelöst


Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

mehr als 5 Jahre vor

Gelöst


Solve a System of Linear Equations
*Example*: If a system of linear equations in _x&#8321_ and _x&#8322_ is: 2 _x₁_ + _x₂_ = 2 _x₁...

mehr als 5 Jahre vor

Gelöst


Max of a Vector
Write a function to return the max of a vector

mehr als 5 Jahre vor

Gelöst


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


Problem for beginners
Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

mehr als 5 Jahre vor

Gelöst


Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

mehr als 5 Jahre vor

Gelöst


Simple Matrix
Make the following matrix without typing it in one by one. [1 2 3; 2 4 6; 4 8 12] x=[1 2 3].

mehr als 5 Jahre vor

Gelöst


Box
Give the volume of a box, x is equal to the body diagonal.

mehr als 5 Jahre vor

Mehr laden