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 solution
Chapter 15 Solutions
THINKING LIKE AN ENGINEER W/ACCESS
- Auto Controls A union feedback control system has the following open loop transfer function where k>0 is a variable proportional gain i. for K = 1 , derive the exact magnitude and phase expressions of G(jw). ii) for K = 1 , identify the gaincross-over frequency (Wgc) [where IG(jo))| 1] and phase cross-overfrequency [where <G(jw) = - 180]. You can use MATLAB command "margin" to obtain there quantities. iii) Calculate gain margin (in dB) and phase margin (in degrees) ·State whether the closed-loop is stable for K = 1 and briefly justify your answer based on the margin . (Gain marginPhase margin) iv. what happens to the gain margin and Phase margin when you increase the value of K?you You can use for loop in MATLAB to check that.Helpful matlab commands : if, bode, margin, rlocus NO COPIED SOLUTIONSarrow_forwardThe 120 kg wheel has a radius of gyration of 0.7 m. A force P with a magnitude of 50 N is applied at the edge of the wheel as seen in the diagram. The coefficient of static friction is 0.3, and the coefficient of kinetic friction is 0.25. Find the acceleration and angular acceleration of the wheel.arrow_forwardAuto Controls Using MATLAB , find the magnitude and phase plot of the compensators NO COPIED SOLUTIONSarrow_forward
- 4-81 The corner shown in Figure P4-81 is initially uniform at 300°C and then suddenly exposed to a convection environment at 50°C with h 60 W/m². °C. Assume the = 2 solid has the properties of fireclay brick. Examine nodes 1, 2, 3, 4, and 5 and deter- mine the maximum time increment which may be used for a transient numerical calculation. Figure P4-81 1 2 3 4 1 cm 5 6 1 cm 2 cm h, T + 2 cmarrow_forwardAuto Controls A union feedback control system has the following open loop transfer function where k>0 is a variable proportional gain i. for K = 1 , derive the exact magnitude and phase expressions of G(jw). ii) for K = 1 , identify the gaincross-over frequency (Wgc) [where IG(jo))| 1] and phase cross-overfrequency [where <G(jw) = - 180]. You can use MATLAB command "margin" to obtain there quantities. iii) Calculate gain margin (in dB) and phase margin (in degrees) ·State whether the closed-loop is stable for K = 1 and briefly justify your answer based on the margin . (Gain marginPhase margin) iv. what happens to the gain margin and Phase margin when you increase the value of K?you You can use for loop in MATLAB to check that.Helpful matlab commands : if, bode, margin, rlocus NO COPIED SOLUTIONSarrow_forwardAuto Controls Hand sketch the root Focus of the following transfer function How many asymptotes are there ?what are the angles of the asymptotes?Does the system remain stable for all values of K NO COPIED SOLUTIONSarrow_forward
- Please draw the section view of the following problemsarrow_forward7) Please draw the front, top and side view for the following object. Please cross this line outarrow_forwardA 10-kg box is pulled along P,Na rough surface by a force P, as shown in thefigure. The pulling force linearly increaseswith time, while the particle is motionless att = 0s untilit reaches a maximum force of100 Nattimet = 4s. If the ground has staticand kinetic friction coefficients of u, = 0.6 andHU, = 0.4 respectively, determine the velocityof the A 1 0 - kg box is pulled along P , N a rough surface by a force P , as shown in the figure. The pulling force linearly increases with time, while the particle is motionless at t = 0 s untilit reaches a maximum force of 1 0 0 Nattimet = 4 s . If the ground has static and kinetic friction coefficients of u , = 0 . 6 and HU , = 0 . 4 respectively, determine the velocity of the particle att = 4 s .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





