For each of the following problems except part (h), write a single MATLAB statement that will accomplish the stated purpose.
a. Create a 150 × 150 matrix N9999 that contains all zeros except for the major diagonal (upper left to lower right). All elements on the major diagonal should contain the value -9999.
b. Create a 1200 × 1200 matrix p75 that contains all zeros except for the minor diagonal (lower left to upper right). All elements on the minor diagonal should contain the value 75.
c. Place the number of rows of matrix Ma into MaRows and the number of columns of matrix ma into maCols.
d. Assume matrix my. contains a single nonzero value. Place the row number containing this nonzero value into NZR and the column number into NZC.
e. Assume matrix Mz has already been defined. Place the row numbers of all elements in Mz that are negative into
f. Assume that matrix ms has already been defined. Place the elements on the major diagonal into row vector MSD.
g. Create a 5 × 9 matrix RM that contains random numbers chosen between -50 and +50.
h. Place the smallest value and the location within the matrix RM (created above) into MinRM. You may use more than one MATLAB statement to accomplish this task.
Want to see the full answer?
Check out a sample textbook solutionChapter 15 Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
- Please write a matlab code to solve thisarrow_forwardQuestion: For The Given 4-DOF Robot: A. Assign Appropriate Frames For The Denavit-... For the given 4-DOF robot: a. Assign appropriate frames for the Denavit-Hartenberg representation. b. Fill out the parameters table. c. Write an equation in terms of A matrices that shows how UTH can be calculated. U # d. a a A1 0-1 A2 1-2 Аз 2 -3 A4 3- Harrow_forwardplease write a matlab codearrow_forward
- Please provide the correct matlab code for the following question.arrow_forwardQ4: Create a Visual Basic Project to find the value of the following series: h? h4 h3 cos(h) = h – 2! 3! 4! Write the code program so that the value of angle (h) is entered into inputbox. Estimate the value of series (cos(h)) so that the absolute value of any term is greater or equal to 10-6. Display the required number of terms (N) which it used in this series in a text box and display the result of series (cos(h)) in another separate text box.arrow_forwardPlease help, this for Matlab the image is the first question with following 2 and 3 they go together. 2. Solving the question by using bisection.m with the stopping criterion at 1%. Report the root and # of iterations. 3. by using newton-Raphson matlab script with the stopping criterion at 0.1%. Report the root and # of iterations.arrow_forward
- Fill in each of the following blanks with the appropriate word: If the displacement model used in the derivation of the element stiffess matrices is also used to derive the element mass matrices, the resulting mass matrix is called __ mass matrix.arrow_forwardWrite MATLAB commands to compute the sine , cosine and tangent of an array of numbers between 0 and 2pi (in steps of 0.1 ) . Save the original input array and all three output arrays to a single MAT file and then clear the workspace .arrow_forwardQ3: Write a program for reading one dimensional array X(I), then arrange its element ascending (4chai) then print matrix after change.arrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY