Assume the matrix M99 has at least two rows and at least two columns. Write no more than two MATLAB commands that, when executed in sequence, will create a 2 × 2 matrix Corn containing the four corner elements of M99, but with their positions swapped diagonally. For example, if M99 had the contents
contains
Want to see the full answer?
Check out a sample textbook solutionChapter 15 Solutions
THINKING LIKE AN ENGINEER W/ACCESS
- Make a matlab codearrow_forwardI am trying to find a Direction Cosine Matrix (DCM) for the Euler angle body 1-2-3 sequence. I tried making my own function and using the MATLAB function, but the result is matrices that are not equal to each other. But, if I were to use the 'ZYX' sequence, I would get a matrix that is equal to the transpose of the matrix produced by my function.I mean that transpose(EA123toDCM) = E123toDCM if I changed the sequence to 'ZYX'. I never got two equal matrices. Can you fix my code so I would get two equal DCM matrices for the body 1-2-3 sequence? Also, for the E123toDCM line, I am using the sequence 'XYZ'. Is that correct or should it be 'ZYX'? I know that that for a DCM of sequence 1-2-3 = R3(theta1)*R2(theta2)*R1(theta3). Is ZYX sequence the same as a 1-2-3 sequence? EA = [pi/3; -pi/4; -pi/6];EA123toDCM = EA123DCM(EA) E123toDCM = angle2dcm(EA(1,1), EA(2,1), EA(3,1), 'XYZ') function [R] = EA123DCM(EA) theta1 = EA(1,1); theta2 = EA(2,1); theta3 = EA(3,1); R1 =…arrow_forwardA member of your team gives you the following MATLAB program. Your job is to create the function used in the program. H = 30; % height [cm] V = 50; % volume [cm^3] % calculates the radius [cm] of a cone R2 = RadiusCone(H,V);arrow_forward
- Can you answer quickly 9)Let A axis team consist of XA, YA and ZA vectors, and B axis team consists of vectors XB, YB and ZB. Let the expression of the origin of the A axis set on the B axis set be denoted by BPAORG. Let BVA denote the representation of the vector VA on the B axis set. Let it be defined as BAR = [BXA BYA BZA]. BAR BPAORG0 0 0 1 Let the 4x4 matrix given as BAT. So what is the result of BAT ACT CBT matrix multiplication? Matrix whose diagonal elements are zero and whose other elements are aZero matrixMatrix whose all elements are oneIdentity matrixarrow_forwardHelp with the MATLAB code to do the following: Given an audio recording of vehicles, compute Power Spectral Density, 1/3 octave band level, octave band level, A-weighted Leq, C-weighted Leq, L10 (unweighted since sample is short), L90 (unweighted since sample is short). If the measurement is made at approximately 50 ft, and that the vehicles are moving at an average of 65 mph, what is the flow rate Q? If instead, the noise is dominated by 1-2 motorcycles, how fast are they going? Given- -The data are in counts -Calibration factor is 133 uPa/count -Sample rate is 44100Hz. -Remember that in air the dB reference is 20 uPa -Pwelch requires that the inputs are doublesarrow_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
- What is an element by element operation in matlab?arrow_forwardMatlab code pleasearrow_forward2. (If relevant) A clearly labeled diagram (or diagrams) clearly pertaining to your analysis with a coordinate system and relevant labels. Final answer with appropriate units and significant figures. You can use the fprintf() command in MATLAB to format numerical results A 2-3 sentence reflection on your answer. Does it make sense? Why or why not? What are some implications?arrow_forward
- The title of our study is "Design and Fabrication of an Agricultural Spraying Attachment for an Autonomous Rover" we need help in the machine design part of our study, specifically Pump selection, battery selection, and center of gravity computation I already sent you the image of the rover Rover weight capacity 35 kilo grams (payload) Rover measurements: Wheel distance - 14.5 inches and 8.5 inches Rover platform size (width & length) 14.4 inches x 10.4 inches Height- 15.8 inches. Water tank selection More or less 25 liters *For tank selection we need to justify the size with the center of gravity, proving that is the maximum dimension or liters of the tank because the center of gravity will be higher making the rover prone to toppling Pump selection *Our sprayer design has two nozzles which splits using a tee splitter, we need to find the size of the pump to obtain the same discharge rate of a normal sprayer. A normal sprayer has a 12V pump and a pressure from 0.2 to 0.45 mpa…arrow_forwardWhat is the return type of angles function in MATLAB ?arrow_forwardI am trying to find a Direction Cosine Matrix (DCM) for the Euler angle body 1-2-3 sequence. I tried making my own function and using the MATLAB function, but the result is a matrix that is transpose of each other. I mean that transpose(EA123toDCM) = E123toDCM. Why is that? Also, for the E123toDCM line, I am using the sequence 'ZYX'. Is that correct or should it be 'XYZ'? I know that that for a DCM of sequence 1-2-3 = R3(theta1)*R2(theta2)*R1(theta3). Is ZYX sequence the same as a 1-2-3 sequence? EA = [pi/3; -pi/4; -pi/6];EA123toDCM = EA123DCM(EA) E123toDCM = angle2dcm(EA(1,1), EA(2,1), EA(3,1), 'ZYX') function [R] = EA123DCM(EA) theta1 = EA(1,1); theta2 = EA(2,1); theta3 = EA(3,1); R1 = @(a)[1 0 0 ; 0 cos(a) -sin(a); 0 sin(a) cos(a)]; R2 = @(a)[cos(a) 0 sin(a) ; 0 1 0 ; -sin(a) 0 cos(a)]; R3 = @(a)[ cos(a) -sin(a) 0; sin(a) cos(a) 0;…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