Drawing something simple with MATLAB
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
I need to write a code to produce the following pattern:
X...X
.X.X.
..X..
.X.X.
X...X
can anyone please help me with the code?
1 comentario
Enis
el 27 de Oct. de 2011
Respuestas (3)
Ajay Kumar
el 27 de Oct. de 2011
disp(' ')
disp('X...X')
disp('.X.X.')
disp('..X..')
disp('.X.X.')
disp('X...X')
disp(' ')
Ajay Kumar
el 27 de Oct. de 2011
0 votos
Try the above. It should work. This is the simplest if you are just trying to display characters
Walter Roberson
el 27 de Oct. de 2011
Hint to get you started:
flipud(diag('XXXXX'))
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!