Concept explainers
Write a user-defined function that determines if a number is a prime number. Name the function pr=Trueprime (m), where the input arguments m is a positive integer and the output argument pr is 1 if m is a prime number and 0 if m is not a prime number. Do not use MATLAWS built-in
(a) Use the function with 733, 2001, and 107.5.
(b) Write a MATLAB program in a script file that makes use of Trueprime and finds the smallest prime number that remains a prime number when added to its reverse (37 is the reverse of 73).
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
MATLAB: An Introduction with Applications
- Differentiate the functionarrow_forwardFind the domain of the function represented by the list of ordered pairs below. {(-1,–2), (–10, –7), (8, 4), (6, –3)} Enter your answer as a list separated by commas.arrow_forwardUse the following ordered-pair function to specify the Domain and Range of ff. Write your answer as an ordered list enclosed in curly brackets.f(x)={(−6,91), (−1,84), (2,53), (41,0), (46,9), (48,64)}f(x)={(-6,91), (-1,84), (2,53), (41,0), (46,9), (48,64)}arrow_forward
- Algebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:CengageCollege Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage LearningAlgebra: Structure And Method, Book 1AlgebraISBN:9780395977224Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. ColePublisher:McDougal Littell
- Big Ideas Math A Bridge To Success Algebra 1: Stu...AlgebraISBN:9781680331141Author:HOUGHTON MIFFLIN HARCOURTPublisher:Houghton Mifflin HarcourtGlencoe Algebra 1, Student Edition, 9780079039897...AlgebraISBN:9780079039897Author:CarterPublisher:McGraw Hill