解決済み

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ヶ月 前

解決済み

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ヶ月 前

解決済み

Determine the mean of matrix

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

3ヶ月 前

解決済み

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ヶ月 前

解決済み

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ヶ月 前

解決済み

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ヶ月 前

解決済み

Determine Whether an array is empty

Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

3ヶ月 前

解決済み

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ヶ月 前

解決済み

Finding perimeter of a rectangle

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

3ヶ月 前

解決済み

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ヶ月 前

解決済み

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ヶ月 前

解決済み

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ヶ月 前

解決済み

Multiply by 3

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

3ヶ月 前

解決済み

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ヶ月 前

解決済み

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ヶ月 前

解決済み

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ヶ月 前

解決済み

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ヶ月 前

解決済み

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ヶ月 前

解決済み

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ヶ月 前

解決済み

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ヶ月 前

解決済み

How many monitors are connected ?

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

3ヶ月 前