Matlab - Ayuda con matriz

 
Vista:

Ayuda con matriz

Publicado por Felix (2 intervenciones) el 28/03/2017 20:55:39
Buenas, no soy muy diestro en matlab, pero me dejaron una tarea donde debo de ingresar los ciertos valores, y despues esos mostrarlos en una matriz, para a partir de ahi hacer operaciones, bueno sin mas les dejo el codigo (disculpen si es algo logico o tonto, pero ne verdad no soy muy buenoc on matlab).

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
fprintf('Ingrese los valores de cada criterio\n ');
ff=1;
gg=1;
hh=1;
ii=1;
jj=1;
fg= input('Ingrese el valor de f/g');
gf=1/fg;
fh= input('Ingrese el valor de f/h');
hf=1/fh;
fi= input('Ingrese el valor de f/i');
iif=1/fi;
fj= input('Ingrese el valor de f/j');
jf=1/fj;
gh= input('Ingrese el valor de g/h');
hg=1/gh;
gi= input('Ingrese el valor de g/i');
ig=1/gi;
gj= input('Ingrese el valor de g/j');
jg=1/gj;
hi= input('Ingrese el valor de h/i');
ih=1/hi;
hj= input('Ingrese el valor de h/j');
jh=1/hj;
ij= input('Ingrese el valor de i/j');
ji=1/ij;
 
 
M=(ff fg fh fi fj ; gf gg gh gi gj; hf hg hh hi hj; iif ig ih ii ij; jf jg jh ji jj )

Gracias por su ayuda
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

Ayuda con matriz

Publicado por JESUS DAVID ARIZA ROYETH (1818 intervenciones) el 28/03/2017 21:23:10
sería algo como esto:

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
fprintf('Ingrese los valores de cada criterio\n ');
ff=1;
gg=1;
hh=1;
ii=1;
jj=1;
fg= input('Ingrese el valor de f/g');
gf=1/fg;
fh= input('Ingrese el valor de f/h');
hf=1/fh;
fi= input('Ingrese el valor de f/i');
iif=1/fi;
fj= input('Ingrese el valor de f/j');
jf=1/fj;
gh= input('Ingrese el valor de g/h');
hg=1/gh;
gi= input('Ingrese el valor de g/i');
ig=1/gi;
gj= input('Ingrese el valor de g/j');
jg=1/gj;
hi= input('Ingrese el valor de h/i');
ih=1/hi;
hj= input('Ingrese el valor de h/j');
jh=1/hj;
ij= input('Ingrese el valor de i/j');
ji=1/ij;
M=[ff fg fh fi fj ; gf gg gh gi gj; hf hg hh hi hj; iif ig ih ii ij; jf jg jh ji jj ];
disp(M)

saludos
https://www.facebook.com/royethmatlab/
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

Ayuda con matriz

Publicado por Felix (2 intervenciones) el 28/03/2017 21:24:37
Si muchas gracias, ya cheque que el error eran los parentesis, los cuales debian ser corchetes, muchas gracias!
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