Homework 1.m - %Sasha Mela%Andrea Cancino%Homework...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
%Sasha Mela %Andrea Cancino %Homework 1 %Question 1.12 %Since nR is constant in the equation, that is the first thing to calculate simply by inputting the values we are given. nR=(2.2*28500)/(273.2-15) nR = 242.8350 %Here it was important to keep the variable on the left side to avoid any errors. N %Now the volume, V , can be found by inputting the values we are given and nR that was calculated. V=(nR*(273.2+31))/2.2 V = 3.3577e+04 %End of Question 1.12 %Question 1.13 %Step 1: Define array x: x=[1:0.2:5] x = Columns 1 through 13 1.0000 1.2000 1.4000 1.6000 1.8000 2.0000 2.2000 2.4000 2.6000 2.8000 3.0000 3.2000 3.4000 Columns 14 through 21 3.6000 3.8000 4.0000 4.2000 4.4000 4.6000 4.8000 5.0000 %Step 2: Define the array y so that it computes x according to the values given above. y=[7*sin(4*x)] y = Columns 1 through 13 -5.2976 -6.9732 -4.4189 0.8158 5.5557 6.9255 4.0944 -1.2203 -5.7948 -6.8542 -3.7560 1.6206 6.0141 Columns 14 through 21 6.7596 3.4048 -2.0153 -6.2130 -6.6419 -3.0420 2.4032 6.3906 %Here it is important to note that the variable x will not multiply properly unless there is a "*" between 4 and x. %Step 3: Find the number of elements in the array: array_size=length(x) array_size = 21
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
%Step 4: Find the third element in y: y(3) ans = -4.4189 %End of question 1.13 %Question 1.21 %Define varible t and give it a 0.1 interval for the plot
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern