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
Create a new SCRIPT file called additup.m, inside this file,
a) Use a for loop to sum the elements in the following vector :
X=[1,23,43,72,87,56,98,33]
b) Check your answer with the sum function.
c) Solve the problem a third time, this time using a while loop.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 steps with 3 images
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
- 4. Write a C++ code that: 1. Read the sequences in the provided fasta file (unzip the attached file) 2. Build a Kmer count table (use array) where k = 10%; 3. Build a histogram table of size 200 in which we store the frequency of counts collected in step 2. if frequency is 200 or more, increment the last element in the histogram array. 4. Report the results of histogram table to screen as the following: Kmer-Count Frequency 1 100 80 3 40 20 .... 200 300arrow_forwardYou have a vector: y <- sample(1000, 30, replace = TRUE) Write a function that will output: a. how many elements are greater than or equal to 200 b. how many elements are equal to 10arrow_forwardWrite down a code whose file name is the initials of your name and sumame, which generates a row vector named x in the inclusive range between 2 and 2 with the number of elements which is equal to the sum of the digits in your student number using the bult-in function generating linearly spaced vector. Next your code includes another row vector named y as follows sin(x)arrow_forward
- Write a function that reads all the numbers from a file into an array. The file is already open and there is no bad data in the file. The data is one number per line and an unknown number of lines of data. The function should read data until either end of file is detected or the array is full. Prototype void readData( ifstream& iFile, double numbers[ ], int size, int& count); iFile - already open ifstream numbers[ ] - array to store data size - the size of the array. count - the number of values read and must be set by the function before returning. HTML EditorKeyboard Shortcutsarrow_forwardComputer Science csv file "/dsa/data/all_datasets/texas.csv" Task 6: Write a function "county_locator" that allows a user to enter in a name of a spatial data frame and a county name and have a map generated that shows the location of that county with respect to other counties (by using different colors and/or symbols). Hint: function(); $county ==; plot(); add=TRUE.arrow_forwardQ4) Given a vector represented by a sequence of of non-zero integers followed by a 0, defined with the DD Assembler command, write a RISCV code that calculates the magnitude of the vector. Store the answer in F6 as a FP. Save your solution as a file named q4.asm and submit it Magnitude of a vector: |x| = +x₂² + For example: v1: DD 1,3,5,0 Magnitude of v1: √1² + 32 +5² = 5.916... 2 + Xn²arrow_forward
- AHPA #11: Changing Grades * * Create a C function (switcher) that will receive a pointer to the finalExams array, using only pointers look for D scores and boost them to C scores. (ouput should be same as picture)arrow_forwardCreate two dynamic arrays A and B with random numbers.a) Merge B in array A calling a function by reference.b) Delete the composite numbers from the merged array A calling a function bypointer. You have to use only two Arrays A and B throughout the code. Be carefulabout memory leakage.arrow_forwardQ1/Vector [2.5 31-309-8.10 11 6.25 -3.5 -] = x Using conditional statements and loops, write a program that creates two vectors of x, the, first (called p) containing the positive elements of x and another vector (called n) containing the negative elements of xlarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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