Concept explainers
Determine solutions to the following problems
a. Assume the matrix springData has two columns. Each row (pair of numbers) represents data about a specific spring. The first column contains a force in newtons, and the second column contains a displacement in inches that the corresponding force caused in that specific spring. With a single MATLAB command, add a third column to SpringData that contains the corresponding spring constant [N/m] for each data pair.
b. Assume two
c. Assume you have a 2 × N matrix OD. The first row contains measurements of the volumes of various objects [m3]. The elements in the second row are measurements of the specific gravities of the corresponding objects. Determine the total mass in kilograms of all of the objects. In other words, perform the calculation
Determine two completely different one-statement solutions.
Want to see the full answer?
Check out a sample textbook solutionChapter 15 Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
- Matlab Codearrow_forwardI created a MATLAB code to plot the orbit of a satellite at an altitude of 300 km (LEO). I wanted to propagate my code for 2 revolutions but instead I used (180*60) because it takes 90 minutes to make a full rotation around the earth in LEO. Is that correct? Also, if I wanted to use revolutions how would I propagate it for 2 revs? Would my t = [0 4*pi].arrow_forwardUSE MATLAB (Convolutional Code) The vector representation of a convolutional code is g1=[1 1]and g2=[1 0]. If the received sequence is 11 11 01 10, please use Viterbi Algorithm todecode it. Please show the full trellis diagram, including the updated trellis statemetrics.arrow_forward
- Please provide the correct matlab code for the following question.arrow_forwardFill 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_forward3arrow_forward
- Question: What is the radix component for the integer -356? Subject name: Microcomputer engineering Department : mechanical Engineeeringarrow_forwardI need help with the purple line the line that you see one the graph on the picture needs to be on the graph. Use this code to add the purple line and make sure it’s crossing the orange line. Please make sure the lines are positioned the same way it is shown on the picture with the graph. Use this code on MATLAB and add the purple line. % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Use the 'seed' function instead of 'rng' seed = 50; % Define your seed here rand('seed',seed); % Assumed CO2 emissions for Diesel and Petrol CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves with a reduced degree of 2 pDiesel = polyfit(carPosition, CO2Diesel, 2); pPetrol = polyfit(carPosition, CO2Petrol, 2); % Generate points for best fit lines fitDiesel = polyval(pDiesel, carPosition);…arrow_forwardI having a problem with my code in MATLAB. In the following code results for r is just a 1x3 matrix. Although inside the while loop r equals to multiple 1x3 matrices. I need r equal to one matrix that is of size 27032x3. So, I just need the multiple r matrices to merge together to get one big matrix. I need that matrix to retain its value outside the while loop as well. cc=0; % set line counter JD = 2460626.666667; fid = fopen('tle_catalog.txt'); % load the TLE tline2='gg'; while ischar(tline2) cc = cc+1; % counter name = fgets(fid);% for the ones with three lines tline1 = fgets(fid); % collect first line of two line elements tline2 = fgets(fid); % collect second line of two line elements if tline2>0 % stop at the end of the file % initialize the propagation [satrec, startmfe, stopmfe, deltamin] ... = twoline2rv(721, tline1, tline2, 'c', 'd'); time_JD = tline1(21:32); yeardayhour = str2double(regexp(tline1, '(\d{2})(\d{3})(\.\d+)', 'tokens', 'once')); dn =…arrow_forward
- Please examine how you got answer step by step pleasearrow_forwardHi I need help to make the line change into a different color, I half of the line to be orange and I need the other half of the line towards the end to be purple as shown in the picture. Also I need there be a box saying Diesel, petrol, diesel best fit, petrol best fit. This part is also shown in the graph. Please use this code and fix it in MATLAB: % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Fix the random seed for reproducibility rng(50); % Assumed positions of cars CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves pDiesel = polyfit(carPosition, CO2Diesel, 3); pPetrol = polyfit(carPosition, CO2Petrol, 3); % Generate points for best fit lines fitDiesel = polyval(pDiesel, carPosition); fitPetrol = polyval(pPetrol, carPosition); % Combine the best fit lines combinedFit =…arrow_forwardRemaining Time: 46 minutes, 46 seconds. V Question Completion Status: A Moving to another question will save this response. Question 16 ets Which system of equations corresponds to the following augmented matrix? [1 31 1 Lo -1 b +c = 4 x + 3y = 6; -x - y = -4 -1 41 A. a + 2b = 3; b + 3c = 6; B. x + 2z = 3; C. u + 2v = 3w + 3; v + 3w = 6; v+w = -4 st D.r + 2s = 3; s + 3t = 6; -s - t = 4 O A. OC. O B. O D. A Moving to another question will save this response. «< Question earcharrow_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