
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
![1- What does the following lines of code do?
A=[2 3 15 8 9 67 11 41;
ind=find (A>8 | A<3);
2- If the following lines of code have errors, corect them; otherwise, write "no errors"
[m IJ=max [2 5 9 8.5];
a=m_*10;
3- We can access persistent variable from outside a function. (True or False).
4- How to use nargout in Matlab?
5- Define a structure that contains three fields.
6- How to load already saved variables to Matlab workspace?
7- How to convert subscripts to linear indices?
8- Redefine the following vector C=[0 2 468 10] using the colon operator (:) and linspace
function
9- Plot a cosine wave in the lower part of the figure below.
VV
1.
az
10- If A-[5 2 3] and B-[8; 9; 6] then create 3*4 matrix by concatenating A and B.
matlab](https://content.bartleby.com/qna-images/question/ad8720cd-933b-4681-9d01-ddecf9c52d69/52275d69-4008-4a3b-a48c-e60fe59b2609/82jgnar_thumbnail.jpeg)
Transcribed Image Text:1- What does the following lines of code do?
A=[2 3 15 8 9 67 11 41;
ind=find (A>8 | A<3);
2- If the following lines of code have errors, corect them; otherwise, write "no errors"
[m IJ=max [2 5 9 8.5];
a=m_*10;
3- We can access persistent variable from outside a function. (True or False).
4- How to use nargout in Matlab?
5- Define a structure that contains three fields.
6- How to load already saved variables to Matlab workspace?
7- How to convert subscripts to linear indices?
8- Redefine the following vector C=[0 2 468 10] using the colon operator (:) and linspace
function
9- Plot a cosine wave in the lower part of the figure below.
VV
1.
az
10- If A-[5 2 3] and B-[8; 9; 6] then create 3*4 matrix by concatenating A and B.
matlab
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 2 steps with 1 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
- What is a stub? Group of answer choices A stub is an inline function with a single line that simply sends a "Hello" message to others, indicating that it has been activated. A stub is a function that has an empty body. It will be developed later. A stub is an inline function with a single line that simply increases the pass in value by one. A stub is a function with a single line that simply prints the name of the function, indicating that it has been activated. A stub is a short function that will generate an error message.arrow_forwardDefine stubs for the functions get_user_num() and compute_avg(). Each stub should print "FIXME: Finish function_name)" followed by a newline, and should return -1. Each stub must also contain the function's parameters. Sample output with two calls to get_user_num() and one call to compute_avg(): FIXME: Finish get_user_num() | FIXME: Finish get_user_num() FIXME: Finish compute_avg() Avg: -1 354684.2266598.qx3zgy7 2 Your solution goes here ''' 4 user_num1 5 user_num2 6 avg_result get_user_num() get_user_num) compute_avg(user_num1, user_num2) 8 user_num1 9 user_num2 10 avg_result %3D 11 12 print('Avg:', avg_result)arrow_forwardGiven the code: void e(int x, int y) { if(y<2) { cout << x << " "; return; } cout << x << " "; e(x+1, y-1); } 1. Trace the function when x and y are 4.arrow_forward
- Scenario ● • Write a program that takes in 5 ints and five doubles from a user, the program should then pass each set to a function which computes the sum and average of the numbers and returns both values. FUNCTIONS (PART 3) 30arrow_forwardOptions are : F A D X C,E Barrow_forwardIn C programming, if the return type of a function is Void how can you implement assert statements? For example, Void ceasar(int n, char*x); //if char = c and n = 3 output == f how do i use assert statements as this does not work assert (caesar(3,c)==f);arrow_forward
- QUESTION 6 Given the code: void a(int n) { if(n<1) { cout << n*2 < " "; return; } cout << n*2 << " "; a(n-1); } 1. Trace the function when n is 4.arrow_forwarddef square(x): return x * X def halve(x): return x // 2 def twice(f,x): """Apply f to the result of applying f to x >>> twice (square,3) 81 >>> twice (square, 4) 256 >>> twice (halve, 32) 8 >>> twice (halve, 80) 20 *** YOUR CODE HERE ***"arrow_forwardUsing C++ Language Write a function call with arguments tensPlace, onesPlace, and userInt. Be sure to pass the first two arguments as pointers. Sample output for the given program: tensPlace = 4, onesPlace = 1 Code: #include <stdio.h> void SplitIntoTensOnes(int* tensDigit, int* onesDigit, int DecVal){ *tensDigit = (DecVal / 10) % 10; *onesDigit = DecVal % 10;} int main(void) { int tensPlace; int onesPlace; int userInt; scanf("%d", &userInt); /* Your solution goes here */ printf("tensPlace = %d, onesPlace = %d\n", tensPlace, onesPlace); return 0;}arrow_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