Feeds
已解决
Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...
2 years 前
已解决
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;...
2 years 前
已解决
Calculate the average value of the elements in the array
Calculate the average value of the elements in the array
2 years 前
已解决
the average value of the elements
Calculate the average value of the elements in the array
2 years 前
已解决
Find max prime number
Given integer number n. Find the max prime number (mpn) that smaller than or equal to n. Example: n = 10 --> mpn = 7
2 years 前
已解决
Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.
2 years 前
已解决
Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...
2 years 前
已解决
multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...
2 years 前
已解决
Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.
2 years 前
已解决
Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...
2 years 前
已解决
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...
2 years 前
已解决
surface of a spherical planet
you just discovered its circumference, that is the input.
2 years 前
已解决
Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...
2 years 前
已解决
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
2 years 前
已解决
Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...
2 years 前
已解决
Divide by 4
Given the variable x as your input, divide it by four and put the result in y.
2 years 前
已解决
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...
2 years 前
已解决
Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12
2 years 前
已解决
Energy of a photon
⚛ ☢ ⚛ ☢ ⚛ ☢ ⚛ Given the frequency F of a photon in giga hertz. Find energy E of this photon...
2 years 前
已解决
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...
2 years 前
已解决
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 ...
2 years 前



