Solved

Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

3 mesi ago

Solved

If you have matrix A, create matrix B using matrix A as an "element"
A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

3 mesi ago

Solved

Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal. (Include all elements that are part ...

3 mesi ago

Solved

Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

3 mesi ago

Solved

Square root of a number
Write a code that will output the square root of x.

3 mesi ago

Solved

Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

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

3 mesi ago

Solved

Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

3 mesi ago

Solved

first element of matrix
find the first elements of a column matrix

3 mesi ago

Solved

Annual Salary
What is the annual salary of Mr. Cody if he works 40 hours a week and gets \$x per hour and a yearly bonus of \$2000? (Let, 50 wee...

3 mesi ago

Solved

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

3 mesi ago

Solved

Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

3 mesi ago

Solved

Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

3 mesi ago

Solved

Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

3 mesi ago

Solved

find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

3 mesi ago

Solved

Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

3 mesi ago

Solved

Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

3 mesi ago

Solved

Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

3 mesi ago

Solved

Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

3 mesi ago

Solved

sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

3 mesi ago

Solved

Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

3 mesi ago

Solved

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

3 mesi ago

Solved

Complex number
For complex number c=a+bi, write code that will add a and b together.

3 mesi ago

Solved

Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

3 mesi ago

Solved

Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

3 mesi ago

Solved

Given input in degrees, output to radians

3 mesi ago

Solved

metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

3 mesi ago

Solved

Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

3 mesi ago

Solved

Find the sum of n squares
What is the sum of the squares of the first n integers?

3 mesi ago

Solved

How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

3 mesi ago