Riccardo Bonomelli
Followers: 0 Following: 0
Feeds
문제를 풀었습니다
Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.
거의 3년 전
문제를 풀었습니다
Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...
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년 초과 전
답변 있음
want to solve (d^2 y)/(dx^2 )+dy/dx-6y=0 using 4th order Runge-Kutta method with y(0) = 3 and y’(0) = 1
Hi, the problem seems to be in the definition of the function f, you defined f as a single variable function or f(x) while, acco...
want to solve (d^2 y)/(dx^2 )+dy/dx-6y=0 using 4th order Runge-Kutta method with y(0) = 3 and y’(0) = 1
Hi, the problem seems to be in the definition of the function f, you defined f as a single variable function or f(x) while, acco...
3년 초과 전 | 0
답변 있음
Help to optimize the execution time of this function, modifying the entries of a matrix (GPU? Parallel CPU?).
Hi Thomas, the easiest procedure to implement to speed up the execution is to generate a MEX file of your function using the Mat...
Help to optimize the execution time of this function, modifying the entries of a matrix (GPU? Parallel CPU?).
Hi Thomas, the easiest procedure to implement to speed up the execution is to generate a MEX file of your function using the Mat...
거의 4년 전 | 1
질문
Plotting triangulation with variables defined at the barycenter
I have created a triangulation of a 2D space, here reported you can see it: On such triangulation I have perfomed some calcul...
대략 4년 전 | 답변 수: 0 | 0
0
답변문제를 풀었습니다
Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...
거의 5년 전
문제를 풀었습니다
The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".
5년 초과 전
문제를 풀었습니다
Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...
5년 초과 전
문제를 풀었습니다
Find the next prime number
Find the next prime number or numbers for given n. For example: n = 1; out = 2; or n = [5 7]; out = [7 11]; ...
5년 초과 전
문제를 풀었습니다
Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...
5년 초과 전
문제를 풀었습니다
Find nearest prime number less than input number
Find nearest prime number less than input number. For example: if the input number is 125, then the nearest prime number whi...
5년 초과 전
문제를 풀었습니다
Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...
5년 초과 전
문제를 풀었습니다
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...
5년 초과 전
문제를 풀었습니다
First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];
5년 초과 전
문제를 풀었습니다
Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...
5년 초과 전
문제를 풀었습니다
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:/...
5년 초과 전
문제를 풀었습니다
Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...
5년 초과 전
문제를 풀었습니다
Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...
5년 초과 전
문제를 풀었습니다
Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...
5년 초과 전
문제를 풀었습니다
Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...
5년 초과 전
문제를 풀었습니다
The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...
5년 초과 전
문제를 풀었습니다
Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...
5년 초과 전
문제를 풀었습니다
Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...
5년 초과 전
문제를 풀었습니다
Determine if input is odd
Given the input n, return true if n is odd or false if n is even.
5년 초과 전
문제를 풀었습니다
Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...
5년 초과 전
문제를 풀었습니다
Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.
5년 초과 전