Question: Using control flow statements ( if / elseif / else statements ) , write a MATLAB code that tests the location of a given point
Using control flow statements ifelseifelse statements write a MATLAB code that tests the location of a given point on a two dimensional plane with respect to
an annular ring of inner radius outer radius centered at point Use the following center point coordinates In this problem, you will need to
report if the point lies:
a inside the annulus;
b on the annulus;
c beyond the outer radius;
d within the annulus.
Below is a schematic drawing of the annular ring.
Question:
Test the following four points and assign their location ie "inside", "outside", on "within the annulus" to the variable names locP locP locP and
locP respectively. The value assigned will be a string type, for example: locP"within the annulus"
Hints:
You can calculate the distance between center point and the points then compare the value with the inner and outer radius.
The stringtype variables are already defined for you to use. For example, the point P is beyond the outer radius, so you can use locPc to assign the string value
"outside".Using control flow statements ifelseifelse statements write a MATLAB code that tests the location of a given point on a two dimensional plane with respect to
an annular ring of inner radius outer radius centered at point Use the following center point coordinates In this problem, you will need to
report if the point lies:
a inside the annulus;
b on the annulus;
c beyond the outer radius;
d within the annulus.
Below is a schematic drawing of the annular ring.
Question:
Test the following four points and assign their location ie "inside", "outside", on "within the annulus" to the variable names locP locP locP and
locP respectively. The value assigned will be a string type, for example: locP"within the annulus"
Hints:
You can calculate the distance between center point and the points then compare the value with the inner and outer radius.
The stringtype variables are already defined for you to use. For example, the point P is beyond the outer radius, so you can use locPc to assign the string value
"outside".Using control flow statements ifelseifelse statements write a MATLAB code that tests the location of a given point on a two dimensional plane with respect to
an annular ring of inner radius outer radius centered at point Use the following center point coordinates In this problem, you will need to
report if the point lies:
a inside the annulus;
b on the annulus;
c beyond the outer radius;
d within the annulus.
Below is a schematic drawing of the annular ring.
Question:
Test the following four points and assign their location ie "inside", "outside", on "within the annulus" to the variable names locP locP locP and
locP respectively. The value assigned will be a string type, for example: locP"within the annulus"
Hints:
You can calculate the distance between center point and the points
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
