MATLAB: Triangle area with two vectors MATLAB and Simulink Student Suitevectors Write a function that returns the area of the triangle formed by the vectors u=[2 3 4] and v=[1 -3 -1] Best Answer function Area = TriVecArea(u,v)Area = .5*norm(cross(u,v));end Related SolutionsMATLAB: Area of Triangle According to Wikipedia:http://en.wikipedia.org/wiki/Triangle#Using_coordinatesx = rand(3,1);y = rand(3,1);z = rand(3,1);fill3(x,y,z,'r')x = x(:)';y = y(:)';z = z(:)';ons = [1 1 1];A = 0.5*sqrt(det([x;y;ons])^2 + det([y;z;ons])^2 + det([z;x;ons])^2)Grzegorz MATLAB: Area of a triangle How about polyarea?>> x = [0, 0, 4];>> y = [0, 3, 0];>> area1 = polyarea(x,y)area1 = 6>> area2 = 0.5*3*4area2 = 6 Related QuestionColoring faces of isosurface corresponding to intensities in a 3D plot.Matlab area of triangle questionPatch: Problem using FaceVertexAlphaData to control edge visibility
Best Answer