
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Question
![Q3/
A) Create the following matrix by using the MATLAB built-in functions (zeros, ones, eye)
0 0 0 1 1
0 0 0 11
10000
A =
0.
1
0 00
00
1
00
0 00
1 0
0 1
000
B) Let X= [5 2 0; 4 3 6; 7 2 5]
1- Find the transpose X'
2- Display the element from row (2) Column (3) to row (3) Column (3)
3- Delete the Ind. Column](https://content.bartleby.com/qna-images/question/a62eabdd-6f75-42c9-8f2d-debde981de74/4d45418b-16f3-4762-b04a-504cead74fe9/usp2jo9_thumbnail.jpeg)
Transcribed Image Text:Q3/
A) Create the following matrix by using the MATLAB built-in functions (zeros, ones, eye)
0 0 0 1 1
0 0 0 11
10000
A =
0.
1
0 00
00
1
00
0 00
1 0
0 1
000
B) Let X= [5 2 0; 4 3 6; 7 2 5]
1- Find the transpose X'
2- Display the element from row (2) Column (3) to row (3) Column (3)
3- Delete the Ind. Column
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 5 steps with 4 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
- (Practice) Write a C++ program that adds equivalent elements of the two-dimensional arrays named first and second. Both arrays should have two rows and three columns. For example, element [1][2] of the resulting array should be the sum of first [1][2]andsecond[1][2]. The first and second arrays should be initialized as follows: first second 16 18 23 24 52 77 54 9111 16 19 59arrow_forward(Data processing) The answers to a true-false test are as follows: T T F F T. Given a twodimensional answer array, in which each row corresponds to the answers provided on one test, write a function that accepts the two-dimensional array and number of tests as parameters and returns a one-dimensional array containing the grades for each test. (Each question is worth 5 points, so the maximum possible grade is 25.) Test your function with the following data:arrow_forward(Numerical) Given a one-dimensional array of integer numbers, write and test a function that displays the array elements in reverse order.arrow_forward
- (Modify) Modify the program written for Exercise 9 by adding an eighth column to the array. The grade in the eighth column should be calculated by computing the average of the top three grades only.arrow_forward(Practice) a. Write a C++ program that adds the values of all elements in the val array used in Exercise 2 and displays the total. b. Modify the program written for Exercise 3a to display the total of each row separately.arrow_forward(Practice) Use the max_element and min_element algorithms to determine the maximum and minimum values in the vector created for Exercise 8. (Hint: Use the expression max_ element(vectorName.begin(), vectorName.end()) to determine the maximum value stored in the vector. Then use the same arguments for the min_element algorithm.)arrow_forward
- A(n) __________ is an array of characters.arrow_forward(Data processing) Construct a three-dimensional weather array for a two-week time period. Include this array in a C++ program that displays the temperatures correctly in response to any of the following user requests: • Any day’s high and low temperatures • Average high and low temperatures for a given month • Month and day with the highest temperature • Month and day with the lowest temperaturearrow_forward(Data processing) a. Write a program to input 10 integer numbers in an array named fmax and determine the maximum value entered. Your program should contain only one loop, and the maximum should be determined as array element values are being input. (Hint: Set the maximum equal to the first array element, which should be input before the loop used to input the remaining array values.) b. Repeat Exercise 8a, keeping track of both the maximum element in the array and the index number for the maximum. After displaying the numbers, print these two messages (replacing the underlines with the correct values): The maximum value is: ___ This is element number ___ in the list of numbers c. Repeat Exercise 8b, but have your program locate the minimum of the data entered.arrow_forward
- How is an array stored in main memory? How is a linked list stored in main memory? What are their comparative advantages and disadvantages? Give examples of data that would be best stored as an array and as a linked list.arrow_forward(Statistics) a. Write a C++ program that reads a list of double-precision grades from the keyboard into an array named grade. The grades are to be counted as they’re read, and entry is to be terminated when a negative value has been entered. After all grades have been input, your program should find and display the sum and average of the grades. The grades should then be listed with an asterisk (*) placed in front of each grade that’s below the average. b. Extend the program written for Exercise 1a to display each grade and its letter equivalent, using the following scale: Between90and100=AGreaterthanorequalto80andlessthan90=BGreaterthanorequalto70andlessthan80=CGreaterthanorequalto60andlessthan70=DLessthan60=Farrow_forward(Electrical eng.) a. An engineer has constructed a two-dimensional array of real numbers with three rows and five columns. This array currently contains test voltages of an amplifier. Write a C++ program that interactively inputs 15 array values, and then determines the total number of voltages in these ranges: less than 60, greater than or equal to 60 and less than 70, greater than or equal to 70 and less than 80, greater than or equal to 80 and less than 90, and greater than or equal to 90. b. Entering 15 voltages each time the program written for Exercise 7a runs is cumbersome. What method could be used for initializing the array during the testing phase? c. How might the program you wrote for Exercise 7a be modified to include the case of no voltage being present? That is, what voltage could be used to indicate an invalid voltage, and how would your program have to be modified to exclude counting such a voltage?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrNew Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage Learning

Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage

Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT

C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr

New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning