Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
Using Matlab
Write a function that takes one input:
- A matrix with m rows and n columns.
It should return one output:
- The product of all of the odd numbers inside of that matrix.
Recall that rem(n,2) will return 1 when n is odd and 0 when n is even.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Given two sorted arrays, write a function to merge them into a single sorted array. What is the time complexity of your solution?arrow_forwardWrite a function to nd the prime factors of an input number, not 0. The function should take an integer and output a vector whose entries are the prime factors of the input. These entries can be repeated ie. if you multiply all the entries you should get the original number. If the input equals to 0, print an error and output the empty vector [ ]. If the input equals to 1, output just the number 1. Do not use the Matlab function factor() to solve this problem. 1arrow_forwardplease answer in MATLABarrow_forward
- Write a program to solve quadratic equations for real roots. No need to use imaginary numbers. ax^2 +bx +c= 0 Requirements:-Define an array of type double with size 3 in main() to store the 3 coefficients.-Read the 3 coefficients from user input.-Create the function prototype and definition for the function getRootCount(discriminant, coefficients) Parameters: discriminant: output to be calculated by the function coefficients: input array of 3 coefficients Return: number of roots: 0, 1, or 2 -Create the function prototype and definition for a function to determine the numbers of roots: getRootCount(discriminant, coefficients); Parameters: discriminant: output value to be calculated by the function (reference parameter) coefficients: input array of 3 coefficients Return: number of roots: 0, 1, or 2 (int) -Create the function prototype and definition for a function to solve equations and get the root(s): solveEquation(discriminant,…arrow_forwardUse Matlabarrow_forwardWrite a function using Java Function Name: winInRowParameters: board: 2D integer array, row: integer, piece: integerReturn: booleanAssume board is valid 2D int array, row is valid index in the board, piece is X==1/O==2Look at indicated row at given index in board. If that row has at least 3 consecutive entries withgiven type of piece (X/O) (3 in a row XXX, OOO), then return true, otherwise false.arrow_forward
- need help with mathlab question?arrow_forwardWrite a function that takes one input arr1, an array of 3 numbers. It should return one output, smallest a scalar double. smallest should be the index number of the lowest number in arr1. Assume that all 3 numbers are different. Do not use min or max to write this functionarrow_forwardDo the part b of the attached question thanksarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education