A résolu


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

4 mois il y a

A résolu


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

4 mois il y a

A résolu


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

4 mois il y a

A résolu


Converts numbers into characters
Converts numbers into characters

4 mois il y a

A résolu


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

4 mois il y a

A résolu


Find the max element of the array
Find the max element of the array

4 mois il y a

A résolu


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

4 mois il y a

A résolu


to the 2 all elements
to the 2 all elements

4 mois il y a

A résolu


Double all elements in the array
Duplicate all elements in the array

4 mois il y a

A résolu


calculate the length of matrix
input 1 array, calculate the length

4 mois il y a

A résolu


the average value of the elements
Calculate the average value of the elements in the array

4 mois il y a

A résolu


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

4 mois il y a

A résolu


Check if number exists in vector
Return 1 if number a exists in vector b otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,2,3]; Returns 1.

4 mois il y a

A résolu


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

4 mois il y a

A résolu


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

4 mois il y a

A résolu


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

4 mois il y a

A résolu


Return area of square
Side of square=input=a Area=output=b

4 mois il y a

A résolu


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

4 mois il y a

A résolu


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

4 mois il y a

A résolu


Inner product of two vectors
Find the inner product of two vectors.

4 mois il y a

A résolu


Create a vector
Create a vector from 0 to n by intervals of 2.

4 mois il y a

A résolu


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

4 mois il y a

A résolu


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not to use d...

4 mois il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

4 mois il y a

A résolu


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

4 mois il y a

A résolu


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

4 mois il y a

A résolu


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

4 mois il y a

A résolu


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

presque 4 ans il y a

A résolu


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

presque 4 ans il y a

A résolu


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

presque 4 ans il y a

Charger plus