Help Solving MATLAB Questions Involving Triangles and Prisms

In summary, the conversation discusses using the area of a triangle from problem 29 as the base area for calculating the volume of right prisms in problem 40. It also mentions creating a B matrix by extracting the first column of matrix A. The issue of using the area from problem 29 and implementing the method for finding the area of a triangle is also brought up. The solution to the problem of creating the B matrix is to use the command B= A(1,:), but it seems to not be working.
  • #1
Mdhiggenz
327
1

Homework Statement


I have a couple of MATLAB questions hopefully you guys can help me out

40).The volume of a right prism is base area * vertical_dimension. Find the volumes of the prisms with triangles of problem 29 as their bases, for vertical dimensions of 10.

I don't understand which part of 29 they want me to incorporate. Question 29 reads the area of a triangle s 1/2 base* height define the base of the matrix as b=[2,3,6]

Would I use the area of question 29 as the base area in question 40?


Create a B matrix by extracting the first column of matrix A

I'm trying B= A(1,:)

Thanks for the help guys.

And it doesn't seem to be working..




Homework Equations





The Attempt at a Solution

 
Physics news on Phys.org
  • #2
Would I use the area of question 29 as the base area in question 40?
That would be my reading. #29 has a bunch of triangles which are to be used as basis for right-prisms. Probably you should implement the method from #29 for finding the area or a triangle.

I'm trying B= A(1,:) ... And it doesn't seem to be working..
In what way?
What does it do instead of what you want?
(Once you have described the problem, the solution should leap out at you.)
 

FAQ: Help Solving MATLAB Questions Involving Triangles and Prisms

How do I find the area of a triangle in MATLAB?

To find the area of a triangle in MATLAB, you can use the formula A = 1/2 * b * h, where b is the base of the triangle and h is the height. You can also use the built-in function area with the coordinates of the vertices of the triangle as inputs.

Can I find the volume of a prism using MATLAB?

Yes, you can find the volume of a prism in MATLAB by multiplying the area of the base by the height of the prism. You can also use the volume function with the coordinates of the vertices of the prism as inputs.

How can I calculate the angles of a triangle in MATLAB?

To calculate the angles of a triangle in MATLAB, you can use the atan2 function with the coordinates of the vertices as inputs. This will give you the angles in radians, so you may need to convert to degrees using the rad2deg function.

Is it possible to plot a triangle or prism in MATLAB?

Yes, you can plot a triangle or prism in MATLAB using the plot or patch functions. You will need to specify the coordinates of the vertices and the color or shape of the plot.

How can I solve for an unknown side or angle in a triangle using MATLAB?

To solve for an unknown side or angle in a triangle in MATLAB, you can use the trigonometric functions such as sin, cos, and tan. You will need to use the known sides or angles and the trigonometric ratios to solve for the unknown value.

Similar threads

Back
Top