A résolu


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

environ 3 ans il y a

A résolu


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

environ 3 ans il y a

A résolu


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

environ 3 ans il y a

A résolu


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

environ 3 ans il y a

A résolu


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

environ 3 ans il y a

A résolu


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

environ 3 ans il y a

A résolu


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

environ 3 ans il y a

A résolu


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

environ 3 ans 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.

environ 3 ans il y a

A résolu


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

environ 3 ans il y a

A résolu


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

environ 3 ans il y a

A résolu


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

environ 3 ans il y a

A résolu


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

environ 3 ans il y a

A résolu


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

environ 3 ans il y a

A résolu


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

environ 3 ans il y a

A résolu


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

environ 3 ans il y a

A résolu


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

environ 3 ans 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 ...

environ 3 ans il y a

A résolu


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

environ 3 ans il y a

A résolu


Square a Number
Given an input x, return y, which is equal to the square of x.

environ 3 ans il y a

A résolu


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

environ 3 ans 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.

environ 3 ans il y a

A résolu


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

environ 3 ans il y a

A résolu


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

environ 3 ans il y a

A résolu


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

environ 3 ans il y a

A résolu


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

environ 3 ans il y a

A résolu


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

environ 3 ans il y a

A résolu


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

environ 3 ans il y a

A résolu


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

environ 3 ans il y a

A résolu


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

environ 3 ans il y a

Charger plus