{"id":2655,"date":"2014-02-25T16:00:57","date_gmt":"2014-02-25T21:00:57","guid":{"rendered":"http:\/\/blog.espol.edu.ec\/icm00794\/?p=2655"},"modified":"2025-12-11T16:30:10","modified_gmt":"2025-12-11T21:30:10","slug":"3eva2013tii_t1-intercambiar-filas-o-columnas-en-matriz","status":"publish","type":"post","link":"https:\/\/blog.espol.edu.ec\/algoritmos101\/fp-3eva20\/3eva2013tii_t1-intercambiar-filas-o-columnas-en-matriz\/","title":{"rendered":"3Eva2013TII_T1 Intercambiar filas o columnas en matriz"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">3ra Evaluaci\u00f3n II T\u00e9rmino 2013-2014, Febrero 25, 2014 \/ICM00794<\/h2>\n\n\n\n<p><strong>Tema 1<\/strong>. (20 puntos). Realice una funci\u00f3n <em><strong>intercambiar<\/strong><\/em>(matriz, <strong>a<\/strong>, <strong>b<\/strong>, <strong>tipo<\/strong>), que al recibir una matriz intercambie las filas o columnas <strong>a<\/strong> y <strong>b<\/strong>.<\/p>\n\n\n\n<p>El par\u00e1metro <strong>tipo<\/strong> con el valor 1 permite intercambiar entre las <em>filas<\/em> <strong>a<\/strong> y <strong>b<\/strong>, pero si tiene el valor de 2 se intercambian las <em>columnas<\/em> <strong>a<\/strong> y <strong>b<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>matriz=\n&#091; 2 7 6 ]\n&#091; 4 5 3 ]\n&#091; 9 8 1 ]\n&gt;&gt;intercambiar(matriz, 1, 3, 1)\n&#091; <strong>9 8 1 <\/strong>]\n&#091; 4 5 3 ]\n&#091; <strong>2 7 6<\/strong> ]\n\n&gt;&gt;intercambiar(matriz, 1, 3, 2)\n&#091; <strong>6<\/strong> 7 <strong>2<\/strong> ]\n&#091; <strong>3<\/strong> 5 <strong>4<\/strong> ]\n&#091; <strong>1<\/strong> 8 <strong>9<\/strong> ]<\/code><\/pre>\n\n\n\n<p><strong>R\u00fabrica<\/strong>: Definir la funci\u00f3n (5 puntos), intercambiar valores entre celdas (5 puntos), intercambiar toda la fila o columna (10 puntos)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>3ra Evaluaci\u00f3n II T\u00e9rmino 2013-2014, Febrero 25, 2014 \/ICM00794 Tema 1. (20 puntos). Realice una funci\u00f3n intercambiar(matriz, a, b, tipo), que al recibir una matriz intercambie las filas o columnas a y b. El par\u00e1metro tipo con el valor 1 permite intercambiar entre las filas a y b, pero si tiene el valor de 2 [&hellip;]<\/p>\n","protected":false},"author":8043,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"wp-custom-template-entrada-fp-ejercicios","format":"standard","meta":{"footnotes":""},"categories":[122],"tags":[148,155],"class_list":["post-2655","post","type-post","status-publish","format-standard","hentry","category-fp-3eva20","tag-arreglos-matrices","tag-funciones"],"_links":{"self":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/2655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/users\/8043"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/comments?post=2655"}],"version-history":[{"count":4,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/2655\/revisions"}],"predecessor-version":[{"id":17081,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/posts\/2655\/revisions\/17081"}],"wp:attachment":[{"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/media?parent=2655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/categories?post=2655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/algoritmos101\/wp-json\/wp\/v2\/tags?post=2655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}