Solved

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...

7 dagen ago

Solved

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...

7 dagen ago

Solved

Return fibonacci sequence do not use loop and condition
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

7 dagen ago

Solved

Find the next Fibonacci number
In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...

7 dagen ago

How do I get matlab to list all numbers from 1 to 10000 without a numbers divisible by 3,7,19?
n=1:10000; n=n(mod(n,3)~=0&mod(n,7)~=0&mod(n,19)~=0);

8 dagen ago | 1

apply condition on Matrix?
If B is a 1 by x vector of 1's and 0's (B = [1,1,1,1,1,0,0,0,0,0]) while sum(B)>T if B is a 1 by x character array (B = '11111...

8 dagen ago | 0

Working with areas under the curve.
x=10:.1:20;%or whatever intervals you want y=10*log(2+x.^2)+(10/3*x); x=[10,x,20]; y=[0,y,0]; z=polyshape(x,y); plot(z) I ...

8 dagen ago | 0

| accepted

Solved

Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...

8 dagen ago

Solved

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]; ...

8 dagen ago

Solved

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...

8 dagen ago

Solved

Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

8 dagen ago

Solved

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...

8 dagen ago

Solved

Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

8 dagen ago

Permutations using multiple vectors of different lengths
If the number of matrixes does not change (in this case 5 different maxtrixes,a b,c,d,e), for-loops could be used this way: out...

8 dagen ago | 1

| accepted

how to write ((x^2)/2)*exp^(-5*x) in mat lap
(x^2/2)*exp(-5*x)

8 dagen ago | 2

Undefined function for input arguments of type 'double': how do I make them vectors and not doubles?
function[val,g,H]=givenfGNM(x) syms a b c val=(1/2)*((2*a-(b*c)-1)^2+(1-a+b-exp(a-c))^2+(-a-2*b+3*c)^2); g=gradient(val, [a b...

8 dagen ago | 0

Replacing multiple values at specific indices in a matrix with a single value
values = [7201,7205,7207,7208,7209,7210,7215]; d=sum(d==values,2); The above should be easier.

8 dagen ago | 0

| accepted

Determine the first digit of each element of Fibonacci Sequence.
str2double(cellfun(@(x)x(1),arrayfun(@(x)num2str(x),fibonacci(1:1000),'UniformOutput',false),'UniformOutput',false)); I think t...

9 dagen ago | 0

| accepted

Link specific coordinates to a color when plotting them
red=[1 0 0]; green = [0 1 0]; color=[red;red;red;red;green;green;green];%make color array for the colors you want at each inde...

9 dagen ago | 0

| accepted

Plot a changing angle over time
function angleOtime(initial,final,vel,n) direction=final-initial; dist=norm(direction); v...

9 dagen ago | 1

| accepted

Solved

Optimal Asymmetric Encryption Padding decoding of message for RSA Cryptography
EME-OAEP decoding by reversing the Feistel network using previously determined mask generation function (MGF1) and SHA-1 hashing...

10 dagen ago

Problem

Optimal Asymmetric Encryption Padding decoding of message for RSA Cryptography
EME-OAEP decoding by reversing the Feistel network using previously determined mask generation function (MGF1) and SHA-1 hashing...

10 dagen ago | 0

Solved

Optimal Asymmetric Encryption Padding of message for RSA Cryptography
EME-OAEP encoding of input message using a Feistel network with SHA-1 hashing within the mask generation function (MGF1) (see pr...

10 dagen ago

Problem

Optimal Asymmetric Encryption Padding of message for RSA Cryptography
EME-OAEP encoding of input message using a Feistel network with SHA-1 hashing within the mask generation function (MGF1) (see pr...

10 dagen ago | 0

Solved

Mask Generation Function (MGF1) for PKCS #1 Standard utilizing Optimal Asymmetric Encryption Padding for RSA Cryptography
Create Mask Generation Function (MGF1) from PKCS #1 v2.2 standard (B.2.1 page 50) at below link. Input will be character array (...

10 dagen ago

Problem

Mask Generation Function (MGF1) for PKCS #1 Standard utilizing Optimal Asymmetric Encryption Padding for RSA Cryptography
Create Mask Generation Function (MGF1) from PKCS #1 v2.2 standard (B.2.1 page 50) at below link. Input will be character array (...

10 dagen ago | 0

Solved

RSA decryption
Decrypt a large integer string using RSA decryption given the public key (n) and private key (d). Convert the large integer decr...

12 dagen ago

Problem

RSA decryption
Decrypt a large integer string using RSA decryption given the public key (n) and private key (d). Convert the large integer decr...

12 dagen ago | 1

Solved

RSA encryption using public key
Encrypt the message text by converting to uint8 matrix using UTF-8 representation. Convert uint8 matrix to a large integer strin...

19 dagen ago

Problem

RSA encryption using public key
Encrypt the message text by converting to uint8 matrix using UTF-8 representation. Convert uint8 matrix to a large integer strin...

19 dagen ago | 0