Making Triangle in matlab
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
How do I make the triangle without plotting function like that?

0 comentarios
Respuestas (2)
KSSV
el 30 de Abr. de 2020
m = 100;
n = 2*m;
I = zeros(m,n) ;
for i = 1:m-1
idx = (n/2-i):(n/2+i) ;
I(i,idx)= 1 ;
end
imshow(I)
5 comentarios
Image Analyst
el 18 de Jul. de 2022
You can use poly2mask
x = [100, 200, 300]; % Left vertex, top vertex, right vertex.
y = [300, 100, 300]; % Left vertex, top vertex, right vertex.
mask = poly2mask(x, y, 400, 400);
imshow(mask);
axis on
0 comentarios
Ver también
Categorías
Más información sobre Labels and Annotations en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

