x = [0 0 1]; % x-coordinate
y = [0 1 0]; % y-coordinate
x_centroid = 0.33333;
y_centroid = 0.33333;
Is this triangle 2D or 3D, because input parametrs are only x and y arrays?
The only issue I have with this problem is that it assumes the input points actually form a triangle. One example where this does not hold is three collinear points.
given 3 sides, find area of this triangle
Find the largest value in the 3D matrix
Given a window, how many subsets of a vector sum positive
Matlab Basics II - squares
Create a Matrix of Zeros
Solve the system of equations.
Find the product of the positive elements above the main diagonal.
Numerate input arguments
Find matrix of indices for multidimensional matrix.
Calculate the eigenvalues of A.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office