Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


Positive Infinity
Round the array a towards positive infinity

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


kmph to mps
convert kilometer per hour to meter per second

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

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

mer än 4 år ago | 0

Solved


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.

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Solved


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

mer än 4 år ago

Load more