![EBK NUMERICAL METHODS FOR ENGINEERS](https://www.bartleby.com/isbn_cover_images/8220100254147/8220100254147_largeCoverImage.jpg)
Two distances are required to specify the location of a point relative to an origin in two-dimensional space (Fig. P2.14):
The horizontal and vertical distances
The radius and angle
FIGURE P2.14
It is relatively straight forward to compute Cartesian coordinates
If the coordinates lie within the first and fourth coordinates
The difficulty arises for the other cases. The following table summarizes the possibilities:
x | Y |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
(a) Write a well-structured flowchart for a subroutine procedure to calculate r and
(b) Write a well-structured function procedure based on your flowchart. Test your program by using it to fill out the following table:
x | Y | r |
|
1 | 0 | ||
1 | 1 | ||
0 | 1 | ||
–1 | 1 | ||
–1 | 0 | ||
–1 | –1 | ||
0 | –1 | ||
1 | –1 | ||
0 | 0 |
(a)
![Check Mark](/static/check-mark.png)
A well-structured flowchart for a subordinate procedure to calculate r and
Answer to Problem 14P
Solution:
Explanation of Solution
Given Information:
To specify the location of a point relative to origin, cartesian coordinates
Cartesian coordinates can be easily computed from the polar coordinates.
Polar coordinates are computed as follows:
Formula used:
Calculation:
The flowchart for converting from Cartesian to polar coordinates is as follows
(b)
![Check Mark](/static/check-mark.png)
A well-structured function procedure based on flowchart of part (a) if two distances are required to specify the location of a point relative to an origin in two-dimensional space. Also, test the program by filling the table given below:
Answer to Problem 14P
Solution:
The values of r and
Explanation of Solution
Given Information:
To specify the location of a point relative to origin, cartesian coordinates
Cartesian coordinates can be easily computed from the polar coordinates.
Polar coordinates are computed as follows:
Calculation:
The MATLAB program for converting Cartesian to polar coordinates is as follows:
% Define a function polar()
function polar(x, y)
% Formula to calculate r
r = sqrt (x.^ 2+ y.^ 2);
if x > 0
% Formula to calculate theta
th= atan(y/ x);
elseif x < 0
% Use for loop to check the condition
if y > 0
th= atan(y / x)+ pi;
elseif y < 0
th= atan(y / x)- pi;
else
th= pi;
end
else
if y > 0
th= pi / 2;
elseif y < 0
th=- pi / 2;
else
th= 0;
end
end
theta = th* 180 / pi;
% Display the polar coordinates
fprintf('r = %4.4f theta = %4.2f\n',r,theta);
Now, to test the program use the following command.
First find polar coordinates for
OUTPUT:
Now, for polar coordinates for
OUTPUT:
Now, for polar coordinates for
OUTPUT:
Now, forpolar coordinates for
OUTPUT:
Now, forpolar coordinates for
OUTPUT:
Now, forpolar coordinates for
OUTPUT:
Now, forpolar coordinates for
OUTPUT:
Now, forpolar coordinates for
OUTPUT:
Now, forpolar coordinates for
OUTPUT:
Hence, the values of r and
Want to see more full solutions like this?
Chapter 2 Solutions
EBK NUMERICAL METHODS FOR ENGINEERS
Additional Engineering Textbook Solutions
Pathways To Math Literacy (looseleaf)
Math in Our World
Intermediate Algebra (13th Edition)
APPLIED STAT.IN BUS.+ECONOMICS
- (read me)arrow_forward(read image)arrow_forwardQu. 13 What are the indices for the Direction 2 indicated by vector in the following sketch? Qu. 14 Determine the indices for the direction A and B shown in the following cubic unit cell. please show all work step by step from material engineeringarrow_forward
- The thin-walled open cross section shown is transmitting torque 7. The angle of twist ₁ per unit length of each leg can be determined separately using the equation 01 = 3Ti GLIC 3 where G is the shear modulus, ₁ is the angle of twist per unit length, T is torque, and L is the length of the median line. In this case, i = 1, 2, 3, and T; represents the torque in leg i. Assuming that the angle of twist per unit length for each leg is the same, show that T= Lic³ and Tmaz = G01 Cmax Consider a steel section with Tallow = 12.40 kpsi. C1 2 mm L1 20 mm C2 3 mm L2 30 mm C3 2 mm L3 25 mm Determine the torque transmitted by each leg and the torque transmitted by the entire section. The torque transmitted by the first leg is | N-m. The torque transmitted by the second leg is N-m. The torque transmitted by the third leg is N-m. The torque transmitted by the entire section is N-m.arrow_forwardPlease help, make sure it's to box out and make it clear what answers go where...arrow_forwardThe cylinder floats in the water and oil to the level shown. Determine the weight of the cylinder. (rho)o=910 kg/m^3arrow_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
![Text book image](https://www.bartleby.com/isbn_cover_images/9780190698614/9780190698614_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134319650/9780134319650_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781259822674/9781259822674_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781118170519/9781118170519_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337093347/9781337093347_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781118807330/9781118807330_smallCoverImage.gif)