Matlab - Matriz con un centro

 
Vista:
sin imagen de perfil

Matriz con un centro

Publicado por Luis (3 intervenciones) el 11/05/2017 08:44:11
Me podrían Ayudar con un programa en Matlab que permita ejecutar una matriz con un 0 en el centro, alrededor con unos, luego con dos, con tres y asi sucesivamente.
Ejemplo:
3 3 3 3 3 3 3
3 2 2 2 2 2 3
3 2 1 1 1 2 3
3 2 1 0 1 2 3
3 2 1 1 1 2 3
3 2 2 2 2 2 3
3 3 3 3 3 3 3
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de JESUS DAVID ARIZA ROYETH
Val: 3.309
Plata
Ha mantenido su posición en Matlab (en relación al último mes)
Gráfica de Matlab

Matriz con un centro

Publicado por JESUS DAVID ARIZA ROYETH (1818 intervenciones) el 11/05/2017 16:33:17
para esto te recomiendo que realices el procedimiento por coordenadas polares , partiendo del radio 1 hasta el número 3 en ese caso o hasta el número que tú deseas...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de JOSE JEREMIAS CABALLERO
Val: 6.975
Oro
Ha mantenido su posición en Matlab (en relación al último mes)
Gráfica de Matlab

Matriz con un centro

Publicado por JOSE JEREMIAS CABALLERO (5917 intervenciones) el 11/05/2017 17:55:28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
>> ordenada_desde_exterior_una_matriz3
autor:JOSE JEREMIAS CABALLERO
            Programador en Matlab
n =
     6
b =
     6     6     6     6     6     6     6     6     6     6     6     6     6
     6     0     0     0     0     0     0     0     0     0     0     0     6
     6     0     0     0     0     0     0     0     0     0     0     0     6
     6     0     0     0     0     0     0     0     0     0     0     0     6
     6     0     0     0     0     0     0     0     0     0     0     0     6
     6     0     0     0     0     0     0     0     0     0     0     0     6
     6     0     0     0     0     0     0     0     0     0     0     0     6
     6     0     0     0     0     0     0     0     0     0     0     0     6
     6     0     0     0     0     0     0     0     0     0     0     0     6
     6     0     0     0     0     0     0     0     0     0     0     0     6
     6     0     0     0     0     0     0     0     0     0     0     0     6
     6     0     0     0     0     0     0     0     0     0     0     0     6
     6     6     6     6     6     6     6     6     6     6     6     6     6
b =
     6     6     6     6     6     6     6     6     6     6     6     6     6
     6     5     5     5     5     5     5     5     5     5     5     5     6
     6     5     0     0     0     0     0     0     0     0     0     5     6
     6     5     0     0     0     0     0     0     0     0     0     5     6
     6     5     0     0     0     0     0     0     0     0     0     5     6
     6     5     0     0     0     0     0     0     0     0     0     5     6
     6     5     0     0     0     0     0     0     0     0     0     5     6
     6     5     0     0     0     0     0     0     0     0     0     5     6
     6     5     0     0     0     0     0     0     0     0     0     5     6
     6     5     0     0     0     0     0     0     0     0     0     5     6
     6     5     0     0     0     0     0     0     0     0     0     5     6
     6     5     5     5     5     5     5     5     5     5     5     5     6
     6     6     6     6     6     6     6     6     6     6     6     6     6
b =
     6     6     6     6     6     6     6     6     6     6     6     6     6
     6     5     5     5     5     5     5     5     5     5     5     5     6
     6     5     4     4     4     4     4     4     4     4     4     5     6
     6     5     4     0     0     0     0     0     0     0     4     5     6
     6     5     4     0     0     0     0     0     0     0     4     5     6
     6     5     4     0     0     0     0     0     0     0     4     5     6
     6     5     4     0     0     0     0     0     0     0     4     5     6
     6     5     4     0     0     0     0     0     0     0     4     5     6
     6     5     4     0     0     0     0     0     0     0     4     5     6
     6     5     4     0     0     0     0     0     0     0     4     5     6
     6     5     4     4     4     4     4     4     4     4     4     5     6
     6     5     5     5     5     5     5     5     5     5     5     5     6
     6     6     6     6     6     6     6     6     6     6     6     6     6
b =
     6     6     6     6     6     6     6     6     6     6     6     6     6
     6     5     5     5     5     5     5     5     5     5     5     5     6
     6     5     4     4     4     4     4     4     4     4     4     5     6
     6     5     4     3     3     3     3     3     3     3     4     5     6
     6     5     4     3     0     0     0     0     0     3     4     5     6
     6     5     4     3     0     0     0     0     0     3     4     5     6
     6     5     4     3     0     0     0     0     0     3     4     5     6
     6     5     4     3     0     0     0     0     0     3     4     5     6
     6     5     4     3     0     0     0     0     0     3     4     5     6
     6     5     4     3     3     3     3     3     3     3     4     5     6
     6     5     4     4     4     4     4     4     4     4     4     5     6
     6     5     5     5     5     5     5     5     5     5     5     5     6
     6     6     6     6     6     6     6     6     6     6     6     6     6
b =
     6     6     6     6     6     6     6     6     6     6     6     6     6
     6     5     5     5     5     5     5     5     5     5     5     5     6
     6     5     4     4     4     4     4     4     4     4     4     5     6
     6     5     4     3     3     3     3     3     3     3     4     5     6
     6     5     4     3     2     2     2     2     2     3     4     5     6
     6     5     4     3     2     0     0     0     2     3     4     5     6
     6     5     4     3     2     0     0     0     2     3     4     5     6
     6     5     4     3     2     0     0     0     2     3     4     5     6
     6     5     4     3     2     2     2     2     2     3     4     5     6
     6     5     4     3     3     3     3     3     3     3     4     5     6
     6     5     4     4     4     4     4     4     4     4     4     5     6
     6     5     5     5     5     5     5     5     5     5     5     5     6
     6     6     6     6     6     6     6     6     6     6     6     6     6
b =
     6     6     6     6     6     6     6     6     6     6     6     6     6
     6     5     5     5     5     5     5     5     5     5     5     5     6
     6     5     4     4     4     4     4     4     4     4     4     5     6
     6     5     4     3     3     3     3     3     3     3     4     5     6
     6     5     4     3     2     2     2     2     2     3     4     5     6
     6     5     4     3     2     1     1     1     2     3     4     5     6
     6     5     4     3     2     1     0     1     2     3     4     5     6
     6     5     4     3     2     1     1     1     2     3     4     5     6
     6     5     4     3     2     2     2     2     2     3     4     5     6
     6     5     4     3     3     3     3     3     3     3     4     5     6
     6     5     4     4     4     4     4     4     4     4     4     5     6
     6     5     5     5     5     5     5     5     5     5     5     5     6
     6     6     6     6     6     6     6     6     6     6     6     6     6
>> ordenada_desde_exterior_una_matriz3
autor:JOSE JEREMIAS CABALLERO
            Programador en Matlab
n =
     2
b =
     2     2     2     2     2
     2     0     0     0     2
     2     0     0     0     2
     2     0     0     0     2
     2     2     2     2     2
b =
     2     2     2     2     2
     2     1     1     1     2
     2     1     0     1     2
     2     1     1     1     2
     2     2     2     2     2

Saludos
JOSE JEREMIAS CABALLERO
Asesor de Proyectos con Matlab
Servicios de programación matlab


http://matlabcaballero.blogspot.com
https://www.facebook.com/matlabcaballero/
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar