Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you help me with this question? 1) For this question do not use functions. Consider a 3x5 matrix A. Write a program that performs

can you help me with this question?

image text in transcribed
1) For this question do not use functions. Consider a 3x5 matrix A. Write a program that performs the following and outputs the results of each step to the screen. a. Inputs an angle theta in radians. b. Initializes elements of the matrix to: A [i][j] = 20 cos (thetaxi) + (-1) '20 cos() c. Swaps the values of the first row and the second row. d. Sorts the third row in ascending order. e. Finds the following: I. The maximum value in the matrix a= I1. The minimum value in the fifth column theta ? 3 III. The average value of the negative numbers IV. The number of zeros values b= V . The sum of the fourth and fifth columns 23.754 21.051 1.7588 36.307 -9. 2596 14.494 11.791 -7.5007 27.047 -21. 051 2. 7031 0 -19.292 15.256 Example: for theta equal to 3 C= -9. 2596 14.494 11.791 -7.5007 27.047 23.754 21.051 1.7588 36.307 - 21. 051 2. 7031 0 -19.292 15.256 d= -9. 2596 14.494 11.791 -7.5007 27.047 0 23.754 21.051 1.7588 36.307 -21. 051 -19.292 0 2. 7031 15.256 e= max = 36.307 min = 15.256 avg = -14.276 zeros = 2 sum 4&5 = 75.571 done. press enter to continue

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions