creatting a polygon in matlab
Mostrar comentarios más antiguos
hi
im going to create a polygon that is combination with points and function.
look at this picture

fourmula of top function is : y = 10+1*exp((-(x-15).^2)/10);
i want to creat a polygon the hatched figured
please help, thanks
Respuesta aceptada
Más respuestas (1)
Alan Stevens
el 4 de Oct. de 2020
You could also use the patch function
x = [0 0:30 30 0];
y = [0 10+exp((-(x(2:end-2)-15).^2)/10) 0 0];
patch(x,y,'r')
Categorías
Más información sobre Elementary Polygons en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!