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...
8ヶ月 前
解決済み
Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...
8ヶ月 前
解決済み
Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series:
pi/4 = 1 - 1/3 + 1/5 - 1/7 + ...
For a given numbe...
8ヶ月 前
解決済み
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...
8ヶ月 前
解決済み
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;...
Linear primes p' = mp + n
Problem statement
List the prime numbers of the form p' = mp + n for a given (m,n) couple and such that p' < k, k positive in...
Check Legendre's conjecture
Context and problem statement
Legendre's conjecture states for a given positive integer n, there always exists at least one pri...
8ヶ月 前
解決済み
List the twin prime couples
Problem statement
The twin prime couples (p,p') are the ones such that p' = p + 2.
For a given integer n > 1, list the twin p...
Voltage Divider Calculation
A voltage divider is a simple circuit used to obtain a reduced voltage from a higher voltage source using two resistors in serie...
8ヶ月 前
解決済み
LED Current Calculation
In an electrical circuit, the current (III) flowing through an LED is determined using Ohm’s Law:
Where:
I is the current ...