Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below the input, N.
Thank you <http:/...
Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise
4年弱 前
解決済み
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 ...
Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...
4年弱 前
解決済み
Double the next!
Given two numbers, m and n, find a matrix m x n where each element value is twice the value of the previous element. Starting fr...
4年弱 前
解決済み
Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements.
Example:
x = [1 2 ...
4年弱 前
解決済み
Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10.
For example, if you add the di...