Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58.
A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...
Sums of cubes and squares of sums
Given the positive integers 1:n, can you:
1. Compute twice the sum of the cubes of those numbers.
2. Subtract the square...
3年以上 前
解決済み
If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...
3年以上 前
解決済み
Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?;
x = [1 : 0.5 : 6];
y ...
3年以上 前
解決済み
Test
Answer the question and the correct answer write in vector. Only one answer is correct.
1a Yes
1b No
1c No
1d No
...
3年以上 前
解決済み
Test of Quiz
Answer the questions and write in vector. Only one answer is correct.
The founder of fuzzy logic is
1a) D. Golberg
1b)...
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)....
What's Your BMI?
Find the body mass index.
For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...
3年以上 前
解決済み
Square a Number
Given an input x, return y, which is equal to the square of x.
3年以上 前
解決済み
Divide by 4
Given the variable x as your input, divide it by four and put the result in y.
3年以上 前
解決済み
kmph to mps
convert kilometer per hour to meter per second
3年以上 前
解決済み
Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z.
Examples:
Inputs x = 2, y = 4
Output z is 6
...
3年以上 前
解決済み
Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.
3年以上 前
解決済み
Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix
Grades=[98 56 34 100 88 87]
**re...