primes(n) returns a row vector with all prime numbers less than or equal to n. The data type of p is identical to that of n.
TF = isprime(X) returns the same size logical array as X. When X(i) is a prime number, the value at TF(i) is true. The value is false otherwise.
Create a function called p = isPrime(n) that returns 1 if n is a prime number and 0 otherwise. Create a function v = primeList(n) that returns a list of prime numbers less than or equal to n.
Learner's Ratings
4.7
Overall Rating
83%
9%
4%
0%
4%
Reviews
H
Het PATEL
5
best
S
Souvik Poddar
5
excellent
A
Ayush Sinha
5
It's a great course, the curriculum is ideal. Very helpful too.
S
Sanjid Ahmed Sany
5
Excellent explanation sir.
S
Sanjid Ahmed Sany
5
Excellent explanation sir.
A
Akash Gupta
5
Excellent
N
Navin Kumar
5
Why payment processing time show technical difficulties.
Share a personalized message with your friends.