Saltar al contenido principal
LibreTexts Español

8.8: El Colón

  • Page ID
    82279
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Puedes usar los dos puntos de varias maneras en MATLAB (ver ayuda:). Su significado básico es un vector de valores secuenciales. Por ejemplo, escriba

    ≫ x = 3:9

    para obtener

    x = 
       3 4 5 6 7 8 9

    Para incrementos distintos a 1, use sentencias como

    ≫ x = 1:0.5:4
    ≫ x = 6:-1:0

    La mayoría de las funciones MATLAB aceptarán entradas vectoriales y producirán salidas vectoriales El comunicado

    ≫ y = sqrt(1:10)

    construye un vector de números enteros del 1 al 10 y toma la raíz cuadrada de cada uno de esos números. Pruébalo.

    Ahora para otra sutileza, ¿cuál es el efecto de cada una de las siguientes afirmaciones y por qué?

    ≫ 1+1:5
    ≫ 1+(1:5)

    Agregar a una matriz o vector

    Una matriz o vector se puede ampliar en tamaño agregando nuevos valores a los valores antiguos. Dejar x= [1 3 5]:

    \[\mathrm{x}=[\mathrm{x} 6810] \Rightarrow \mathrm{x}= [1356810] \nonumber \]

    \ [y= [x; 1:6]\ Rightarrow y=\ left [\ begin {array} {llllll}
    1 & 3 & 5 & 6 & 8 & 10\\
    1 & 2 & 3 & 4 & 5 & 6
    \ end {array}\ derecha]\ nonumber\]


    This page titled 8.8: El Colón is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Louis Scharf (OpenStax CNX) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.