Can anyone tell me how to write an M-file for graphing two diagonals on a Square shape graph by using the 'plot' command?

Réponses (1)

Walter Roberson
Walter Roberson le 26 Fév 2016

0 votes

X = 11.38; %size of square
plot([0 X X 0 0 X nan 0 X], [0 0 X X 0 X nan X 0])
axis equal

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by