解決済み


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

約3年 前

解決済み


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年 前

解決済み


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

約3年 前

解決済み


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

約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年 前

解決済み


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

約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年 前

解決済み


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

約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年 前

解決済み


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

約3年 前

解決済み


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

約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年 前

解決済み


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

約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年 前

解決済み


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

約3年 前

解決済み


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

約3年 前

さらに読み込む