2D triangle.
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
how to create a 2D triangle and save it as png or something similar file but as array of two dimensions.
0 comentarios
Respuestas (1)
KSSV
el 7 de Nov. de 2016
clc; clear all ;
C = rand(3,2) ;
% vertices of triangle
ver = [C ; C(1,:)] ;
% save into png
plot(ver(:,1),ver(:,2),'r')
saveas(gcf,'triangle.png')
% save vertices into txt file
save vertices.txt ver -ascii
0 comentarios
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!