Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help me please solve this problem using MATLAB DO NOT USE BUILT IN FUNCTIONS Problem #1: Write a program which will: a. Accept two numbers

image text in transcribed
help me please solve this problem using MATLAB
DO NOT USE BUILT IN FUNCTIONS Problem #1: Write a program which will: a. Accept two numbers from the user mand n b. Define an array with the dimensions alm,n) and fill it with random numbers in the range of -100 to 100 inclusive. c. Provide the user the following menu from which he can select: 1. Sum of all elements in the array, Print the result. 2. Sum of the element in a row that the user specifies. Print the result 3. Sum of the element in a column that the user specifies. Print the result. 4. Sum of the elements in the right diagonal. Print the result. 5. Sum of the elements in the left diagonal. Print the result. 6. The element with the minimum value in the array, Print the result. 7. The element with the maximum value in the array, Print the result. 8. The element with the minimum value in a row that the user specifies. Print the result 9. The element with the maximum value in a row that the user specifies. Print the result. 10. The element with the minimum value in a column that the user specifies. Print the result. 11. The element with the maximum value in a column that the user specifies. Print the result. 12. Print the menu again 13. Exit from the program d. The user can elect from the menu as many times as he wants without leaving the program Problem #2: Write a program that will perform the following Construct an array the same way you did in problem 1 (a) and (b). Perform the following operations: a. Accept from the user two row numbers. Multiply the two rows (element by element) and find the sum. Print the result b. Accept from the user two column numbers. Add the two columns (element by element) and find the sum. Print the result

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions