Write a script that will create a two-dimensional patch object with just three vertices and one face connecting them
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:12| Question number:24.12
All Answers
total answers (1)
Ch12Ex24.m
% Create a 2D patch object with random vertices
% and just one face
polyhedron.vertices = [...
rand rand rand
rand rand rand
rand rand rand];
polyhedron.faces = [1 2 3];
pobj = patch(polyhedron, ...
'FaceColor',[0.8, 0.8, 0.8],...
'EdgeColor','black', 'LineWidth', 3);
axis([0 1 0 1])
need an explanation for this answer? contact us directly to get an explanation for this answer