Determine the mean of matrix
Determine the mean of matrix without using mean function
Hint: use simple algorithm
3年弱 前
解決済み
What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...
3年弱 前
解決済み
Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.
3年弱 前
解決済み
Remove the positive integers.
Given array x (of integers), remove all the positive numbers and display ouput as y.
Example x=[1 -2 3 -4] , output is y=[-2 -...
3年弱 前
解決済み
Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not.
Example:
1:7 -> 0
[7 5 2] -> 1
3年弱 前
解決済み
Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0".
Exa...
Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.
3年弱 前
解決済み
Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...
Determine if input is a perfect number
A perfect number occurs whent the sum of all divisors of a positive integer, except the number itself, equals the number.
Examp...
Areas
Given certain dimensions determine the area of that shape. If given only one value assume its the radius. Use round(x) to round ...
3年弱 前
解決済み
Solving a quadratic equation
Given a, b and c, Return the solution of the following quadratic equation:
a*x^2 + b*x + c = 0.
3年弱 前
解決済み
Triangle Numbers Below N
This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...
Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...