Question

Introduction to Engineering I Spring 2019 MATLAB Homework Assignment 1 a) Create a matrix called d from the third column of m

Introduction to Engineering Spring 2019 MATLAB Homework Assignment 1 Create ONE MATLAB script to solve the following problems

help wanted?

Introduction to Engineering I Spring 2019 MATLAB Homework Assignment 1 a) Create a matrix called d from the third column of matrix a. (Hint, typing d 22: 5: 821 b) Combine matrix b and matrix d to create matrix e, a two-dimensional matrix with three rows c) Combine matrix b and matrix d to create matrix f, a one-dimensional matrix with six rows and d) Create matrix g from matrix a and the first three element of matrix C, with four rows and three e) Create a matrix h with the first element equal to a1,3, the second element equal to C1,2 and the would be wrong!) and two columns. one column. columns third element equal to b2,1 Be sure to include adequate commenting and blank space. -Be sure to display your results appropriately, not just leave off semi-colons. -Make sure that the script runs without any errors, and produces expected results - Follow the following format to ensure that each problem is being solved in a separate section within the script: %Script by: Your Name % Introduction to Engineering I-Section: 1234 % Spring 2019-MATLAB Homework 1 % April 16th, 2019 Problem 1 clear, clc Your solution starts here Problem 2 clear, clc %Your solution starts here Problem 3 clear, clc %Your solution starts here Problem 4 clear, clc %Your solution starts here
Introduction to Engineering Spring 2019 MATLAB Homework Assignment 1 Create ONE MATLAB script to solve the following problems. Your script must be named SectionxX YowLastNome YourFirstName HW1, Where XX is your section's number (i.e, my file would be: SectionS2 Aigheshyan Fahad HWI.m), submitted through Blackboard by the due date and time, and the script must follow the MATLAB Requirements stated at the end of this assignment Problem 1 A box has a height of 6 cm and a square base with an edge of x cm. Create a nicely formatted table (See solution for In-Class 1) that shows the value of x, the volume of the box, and the surface area of the box. Use 1 sx s 3, with an increment of 0.25 cm. Problem 2 Burning one gallon of gasoline in your car produces 19.4 pounds of CO1. Calculate the amount of CO, emitted during a year for the user's vehicle. You should ask the user for the vehicle's fuel efficiency in mpe, and total mileage traveled in one year, your solution will return the amount of C02 emitted by the user's vehicle during that one year. Mileage Problem ii Chemical reaction rates are proportional to a rate constant k that changes with temperature according to the Arrhenius equation k = koe- For a certain reaction, Q = 8000 cal/mol R 1.987 cal/mol K ko = 1200 min-1 Find the values of k for 11 linearly equally spaced temperatures (T) from 100 K to 500 K inclusively. Create a nicely formatted and labeled table of your results. (Note, use the proper MATLAB command for e) Problem 4 Create the following matrices then use them in the following questions 15 з 22 a3 8 5 14 3 82 b-512 18 5 2] (Note: In the following questions, you must use matrix manipulation operations referring to the above matrices)
0 0
Add a comment Improve this question Transcribed image text
Answer #1

%% Script by:
% Introduction to Engineering I - Section:
% Spring 2019 - MATLAB Homework I
% April 16, 2019


%% Problem 1
clear,clc;
x=[1:.25:3]'; %create x with increaments of 0.25
h=6; %height of the box
base_area=x.*x; %This is the area of the base
volume_box=h.*base_area; %volume of the box;
surface_area=h*4*x+2*x.*x; %Surface area of the box
display(table(x,volume_box,surface_area));


%% Problem 2
clear,clc;
efficiency=input('Please Enter the Fuel Efficiency of your Vehicle in miles per gallon (mpg): ');
mileage=input('Please enter the total mileage in one year: ');
emissions=19.4*(mileage/efficiency);
fprintf('The total amount of Carbon dioxide emission in one year is %f pounds\n',emissions);

%% Problem 3
clear,clc;
T=linspace(100,500,11); %creates 11 equally spaced values between 100 and 500
Q=8000;
R=1.987;
k0=1200;
k=k0*exp(-Q./(R*T)); %exp is used for exponential function
display(table(T',k','VariableNames',{'Temperature' 'Rate'}));

%% Problem 4
clear,clc;
a=[15 3 22;3 8 5;14 3 82]; %This is the matrix a
b=[1;5;6]; %This is the matrix b
c=[12 18 5 2]; %This is the matrix c
d=a(:,3); % Assigning d as the third column of a
display(d);
e=[b d]; % Combining b and d to create a 3x2 matrix
display(e);
f=[b;d]; % Combining b and d to create a 6x1 matrix
display(f);
g=[a;c(1,1:3)]; % Combining a and c to create a 4x3 matrix
display(g);
h=[a(1,3);c(1,2);b(2,1)];
display(h);

==================================================================================

Hope I have answered your question. Give your comments and rating so that I can improve my future answers

Add a comment
Know the answer?
Add Answer to:
Introduction to Engineering I Spring 2019 MATLAB Homework Assignment 1 a) Create a matrix called ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please follow following scripts: Script for part A:Script for Part B: Matlab Exercises 1. Find the...

    Please follow following scripts: Script for part A:Script for Part B: Matlab Exercises 1. Find the determinant (command: det(A)) and the condition number (command: cond(A)) of the Hilbert matrix H of order k (command: hilb(k)), for k = 1,2, ..., 10. Plot the determinant and the condition number as a function of k using a logarithmic scale for the vertical axis. Hint: The template to help you with this homework assignment is homework/hw15.m. 2. Determine if y is in the...

  • Matlab: PART 3 - Applications Create a script for each of the following four application problems...

    Matlab: PART 3 - Applications Create a script for each of the following four application problems (A7P3Alastname.m, A7P3Blastname.m, A7P3Clastname.m and A7P3Dlastname.m). Each program will call your function A7GAUSSlastname.m to solve the linear algebra problem. Use the following output statements to display formatted output in the command window: fprintf('In Assignment 7, Part 3a - Materials/Mixtures In(Note: Edit this line for each problem) fprintf ('\n Coefficient Matrix A : \n\n'); for i-1:size(A, 1) fprintf("%10.2f',A(i, :)); fprint'In') end fprintf'In Vector b: Inln') fprintf...

  • Answer #1 EM 4123/6123: Introduction to Finite Element Methods: Assignment 2 Assigned: Jan. 23, 2019, Due:...

    Answer #1 EM 4123/6123: Introduction to Finite Element Methods: Assignment 2 Assigned: Jan. 23, 2019, Due: Jan 30, 2019, 11.00am 20 Points per problem. Total: 60 Points Derive the weak form of the variational statement for each of the following boundary value problems NOTE: Show all steps of derivation NOTE: Identify the conditions on the variation that are consistent with the specified boundary con- ditions. (Hint: the variation cannot be arbitrary where the value of solution is specified) 1. Poisson's...

  • use matlab Assignment: 1) Write a function program that implements the 4th Order Runge Kutta Method....

    use matlab Assignment: 1) Write a function program that implements the 4th Order Runge Kutta Method. The program must plot each of the k values for each iteration (one plot per k value), and the approximated solution (approximated solution curve). Use the subplot command. There should be a total of five plots. If a function program found on the internet was used, then please cite the source. Show the original program and then show the program after any modifications. Submission...

  • Spring 2019 Homework Requirements (5pts) l. File Naine Format: Lastname-Hw-#-Es100XX,S19.slx (whe...

    Spring 2019 Homework Requirements (5pts) l. File Naine Format: Lastname-Hw-#-Es100XX,S19.slx (where # İs the HW number and XX is your section number) 2. Heading Format: Include your Full Name, HW-#, ES 100XX-S19, and Due Date each in a separate line. 3. Commenting: Thoroughly comment your code including units throughout the code and on all answers (if applicable) . Run-Time Errors: Program should run without any run-time errors (red text in command window). 5 Solution Variables Names: All solution variables should...

  • Programming Assignment 5: For-Loops CSCI 251-Spring 2019 This program will use the concepts in th...

    using matlab Programming Assignment 5: For-Loops CSCI 251-Spring 2019 This program will use the concepts in the decimal to octal program Introduction: In file systems on servers (think of websites like Google, Amazon, etc.), permission to access the files come from the octal number system. Given an octal quadruple, permissions are defined for the user, the group, and other as follows: Permission First Digit Second Digit Third Digit Fourth Digit Always 01 (User-u) 0 」(Group-g) | (Other-o) Read (r) Write...

  • Homework Assignment 1 Spring 2019 Question 2: Bayes' Rule (a) A customer interested in a loan...

    Homework Assignment 1 Spring 2019 Question 2: Bayes' Rule (a) A customer interested in a loan approaches the bank you work for. Based on historical information, the bank believes that the customer will be able to repay the loan with a probability of 97.5%. However, before they agree to provide the customer with a loan, the bank will run a credit check. Historically, 80% of the people that repay the loan had a good credit check: 15% of the people...

  • CIS 411w spring 2017 Problem Set 11    1 Log in to your Oracle ApEx account....

    CIS 411w spring 2017 Problem Set 11    1 Log in to your Oracle ApEx account. 2. Create a new table called email with this command: CREATE table email as (SELECT empno, ename||'.'||SUBSTR(JOB,1,2)||'@apex.com' as "EMAIL" from emp); Click à Run to create this table 3. Write a SQL query that JOINS the three tables emp,dept and email. This SQL query will return the empno, ename, job, sal, loc and email for each employee. Use the newer ANSI JOIN syntax rather...

  • Nay programming languge is fine (MatLab, Octave, etc.) This is the whole document this last picture...

    Nay programming languge is fine (MatLab, Octave, etc.) This is the whole document this last picture i sent is the first page 5. Write and save a function Sphere Area that accepts Radius as input argument, and returns SurfaceArea (4 tt r) as output argument. Paste the function code below. Paste code here 6. Validate your Sphere Area function from the command line, checking the results against hand calculations. Paste the command line code and results below. 7. Design an...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT