This preview shows pages 1–4. Sign up to view the full content.
25.1)
In an effort to conserve paper and grading time we will present only the lines of code which were changed
in mywasher.m and mywedge.m as well as the 3D graphs produced by the programs after modifications.
The code to mywasher.m was modified by the following:
Line 164 was changed to z = (x+y)./(x.^2+y.^2)
Lines 195 and 196 were commented out
z = (x+y)./(x.^2 + y.^2);
% Set node values to a linear funtion.
% z(49:64) = 0; % Set inner boundary nodes to zero.
% z(1:32) = 0;
% Set interior nodes to zero.
Figure 25.1a1 – Plan View of mywasher.m
Figure 25.1a2 – Isometric View of mywasher.m
The code to mywedge.m was modified by the following:
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document Line 40 was changed to z = sin(x) + sqrt(y)
Line 41 was commented out
% Set node values to a function
z = sin(x) + sqrt(y);
%z(1:9) = 0;
f = z;
Figure 25.1b1 – Plan View of mywedge.m
Figure 25.1b2 – Isometric view of mywedge.m
25.2)
The function m file for mythreecorners.m was modified to produce a new program called myceters.m
which calculates the integral based on the center point of the triangles.
The x and y values of each
triangle were averaged to determine the center point.
This value of the function at this point was
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 01/15/2011 for the course MATH 345 taught by Professor Staff during the Spring '08 term at Ohio State.
 Spring '08
 Staff

Click to edit the document details