1 / 8

Examples:

Examples:. How do you calculate a and b, which satisfy given equations by computer?. With Visual Basic 40 n = 2 … 41 xb(1) = 1: xb(2) = 0: xh(1) = .001: xh(2) = .001 … 45 '---- Error equations ----------- a(1, 1) = 6 * xb(1): a(1, 2) = 4 * xb(2)

abdalla
Télécharger la présentation

Examples:

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Examples: How do you calculate a and b, which satisfy given equations by computer? With Visual Basic 40 n = 2 … 41 xb(1) = 1: xb(2) = 0: xh(1) = .001: xh(2) = .001 … 45 '---- Error equations ----------- a(1, 1) = 6 * xb(1): a(1, 2) = 4 * xb(2) a(2, 1) = 6 * xb(1) ^ 2: a(2, 2) = 2 *( xb(2) – 1) b(1) = -(3 * (xb(1) ^ 2 - 1) + 2 * xb(2) ^ 2 - 11) b(2) = -(2 * xb(1) ^ 3 + (xb(2) - 1) ^ 2 - 16) 46 '-------------------- … End Sub With Matlab >>[a,b]=solve('3*(a^2-1)+2*b^2=11','2*a^3+(b-1)^2=16') Matlab gives all possible solutions

  2. Examples: Number of points Noktalar Hangi değer için hesaplama yapılacak The x and y coordinates of three points on the screen, which were clicked by a CAD user are given in the figure. Find the y value of the curve obtained from these points at x=50. • How do you find the answer with computer? • The file li.txt is arranged as given below and the code Lagr.I is run. • li.txt • 3 • 25,-10 • 40,20 • 70,5 • 50 Sonuç: 26.111 b) How do you find the answer manually?

  3. Examples: A stationary car starts to move with the acceleration given below • Find the speed of the car at the end of 10 seconds • Manually • With computer a) Sub simpson_Click( ) 80 a=0: b=10:m=2 … 85 f=(1+sin(x^3))/Sqr(x^2+1) … End Sub b) With computer m=2 (n=4) için v=3.236 m=100 (n=200) için v=3.318

  4. Examples: Roots Find the intersection area of the curves y=x2+2 ile y=3x . >> roots([1 -3 2]) With Computer: Sub simpson_Click ( ) 80 a=1:b=2:m=2 … 85 f=3*x-x^2-2 … End Sub

  5. Examples: For a steel plate weighing 10 N and has a thickness 3 mm, the the coordinates of some points shown in the figure were measured (in cm) by a Coordinate Measuring Machine (CMM). How do you calculate the intensity of the steel by fitting a curve, which passes through these points. ? a) Manual calculation: The volume of the part is calculated by using its surface area and 0.3 cm thickness value. The simpson’s rule is used for area calculation. The x axis must be divided in equal segments in this method. Since the points are not equally spaced on the x axis, the necessary y values should be calculated at suitable x values. If we divide the interval 0-4 into four equal sections using the increment ∆x=1 , we can obtain the y values for x=1, x=2 and x=3.

  6. Examples:

  7. Examples: b) With computer: For calculation with computer, the li.txt file is arranged to find the y values for x=1, x=2 and x=3 and the code Lagr.I is run. li.txt 4 0,5 2.5,7.8 3.7,9.3 4,10 1 li.txt 4 0,5 2.5,7.8 3.7,9.3 4,10 2 li.txt 4 0,5 2.5,7.8 3.7,9.3 4,10 3 The area of the plate can be calculated by using Simpson’s rule. Then, the density of the steel can be calculated as mentioned before.

  8. Examples: How do you calculate u,w and z with computer? With Matlab clc;clear a=[-1 1 -3;0 3 -6;1 1 1]; b=[9;12;5]; c=inv(a)*b

More Related