SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
15-8-2012




ELECTRONICA
PERÚ
              TUTORIAL LABVIEW 2010




              COMPARTE EL CONOCIMIENTO
TUTORIAL LABVIEW 2010 15 de agosto de 2012



                            ARREGLOS


EJEMPLO1:

GENERAR UN ARRAY CON 7 ELEMENTOS Y UNA MATRIZ DE 5x4 CON NUMEROS ENTEROS


SOLUCION:
PARA GENERAR UN ARREGLO Y UNA MATRIZ HACEMOS USO DEL FOR (ASI COMO CUANDO
PROGRAMAMOS EN C).

      EN EL DIAGRAMA DE BLOQUES TENEMOS:




                                                       ELECTRONICA PERÚ     1
TUTORIAL LABVIEW 2010 15 de agosto de 2012




   EL PANEL FRONTAL TENEMOS LOS VALORES GENERADOS PERO COMO NOS DAMOS
    CUANTA NO SON ENTEROS ESTO ES DEBIDO A QUE NUESTRO BLOQUE
    ARRAYXY(INDICADOR) SE ENCUENTRA EN DOBLE FLOAT.




                                                  ELECTRONICA PERÚ   2
TUTORIAL LABVIEW 2010 15 de agosto de 2012

   PARA GENERAR LOS NUMEROS ENTEROS TENEMOS QUE CAMBIAR SU FORMATO Y ESTO
    LO HACEMOS DE LA SIGUIENTE MANERA:

    NOTAMOS QUE POR DEFECTO ESTA CONFIGURADO EN DOBLE FLOAT




   SELECCIONAMOS EL FORMATO LONG(I32) QUE SON LOS ENTEROS LARGOS DE 32bit




                                                      ELECTRONICA PERÚ   3
TUTORIAL LABVIEW 2010 15 de agosto de 2012

   AHORA TENEMOS EN EL DIAGRAMA DE BLOQUES :




   Y EN EL PANEL FRONTAL OBSERVAMOS UN ARREGLO Y UNA MATRIZ CON NUMEROS
    ENTEROS.




                                                     ELECTRONICA PERÚ   4
TUTORIAL LABVIEW 2010 15 de agosto de 2012

EJEMPLO2:
HACER UNA SUMA DE MATRICES REALES Y UNA SUMA DE MATRICES CON NUMEROS COMPLEJOS

SOLUCION:



      PARA INGRESAR DATOS DENTRO DE UNA MATRIZ NOS VAMOS AL PANEL FRONTAL Y
       SELECCIONAMOS RealMatrix.ctl y ComplexMatrix.ctl




                                                       ELECTRONICA PERÚ   5
TUTORIAL LABVIEW 2010 15 de agosto de 2012

   CREAMOS CUATRO MATRICES DOS REALES Y DOS COMPLEJAS.




                                                     ELECTRONICA PERÚ   6
TUTORIAL LABVIEW 2010 15 de agosto de 2012

   COMO YA TENEMOS LAS MATRICES EN REALES Y COMPLEJOS PARA SUMARLAS O
    RESTARLAS SIMPLEMENTE SELECCIONAMOS LOS BLOQUES DE SUMAR Y RESTAR LUEGO
    LES CREAMOS UN INDICADOR.




                                                    ELECTRONICA PERÚ   7
TUTORIAL LABVIEW 2010 15 de agosto de 2012

   SUMAMOS RESTAMOS Y TENEMOS LA SUMA Y RESTA DE NUMEROS REALES Y COMPLEJOS




                                                    ELECTRONICA PERÚ   8
TUTORIAL LABVIEW 2010 15 de agosto de 2012

EJEMPLO3:

CREAR UNA MATRIZ CON NUMEROS ENTEROS Y CALCULAR CUANTAS FILAS Y CUANTAS
COLUMNAS TIENE.

CREAR UN ARRAY Y CALCULAR EL NUMERO DE ELEMENTOS QUE TIENE


SOLUCION:
      PARA OTENER EL TAMAÑO DE UNA MATRIZ O UNA ARRAY HACEMOS USO DEL BLOQUE
       SIZE.




                                                        ELECTRONICA PERÚ   9
TUTORIAL LABVIEW 2010 15 de agosto de 2012

   EN EL PANEL FRONTAL PARA LA MATRIZ INGRESAMOS EL NUMERO DE FILAS NUMERO DE
    COLUMNAS Y PARA EL ARRAY EL NUMERO DE ELEMENTOS ENTONCES NOTAMOS QUE EL
    SIZE CREADO CONCUERDA CON LO QUE INGRESAMOS, ESTE EJERCICIO SOLO ES PARA VER
    LA FUNCION DEL SIZE EL CUAL NOS SERA DE UTILIDAD EN FUTUROS EJEMPLOS.




                                                      ELECTRONICA PERÚ   10
TUTORIAL LABVIEW 2010 15 de agosto de 2012

EJEMPLO4:
EXTRAER FILAS Y COLUMNAS DE UNA MATRIZ DE 6x4


SOLUCION:
      PARA LOGRAR ESTO HACEMOS USO DEL BLOQUE INDEX EL CUAL PERMITE SEPARAR EN
       COLUMNAS O EN FILAS.




                                                         ELECTRONICA PERÚ   11
TUTORIAL LABVIEW 2010 15 de agosto de 2012



   EN EL PANEL FRONTAL TENEMOS LA SEPARACION EN :
    COLUMA0 COLUMNA1 FILA 2 Y FILA 3.




                                                      ELECTRONICA PERÚ   12
TUTORIAL LABVIEW 2010 15 de agosto de 2012

EJEMPLO5:

EXTRAER ELEMENTOS DE LA FILA3 APARTIR DE LA POSICION1

SOLUCION:


      PARA LOGRAR ESO HACEMOS USO DEL BLOQUE ARRAY SUBSET EL CUAL ME PERMITE
       INGRESAR LA POSICION Y LA CANTIDAD DE DATOS QUE QUIERE EXTRAER APARTIR DE ESA
       POSICION.




                                                          ELECTRONICA PERÚ   13
TUTORIAL LABVIEW 2010 15 de agosto de 2012


   SE NOTA LA EXTRACION DE ELEMENTOS DE LA FILA3, EL ARRAY SUBSET TIENE GRAN
    UTILIDAD CUANTO ADQUIRIMOS DATOS YA QUE TOMAMOS LA CANTIDAD DE DATOS DE
    UNA TRAMA O LOS DATOS MAS IMPORTANTES PARA REALIZAR UNA GRAFICA.




                                                    ELECTRONICA PERÚ   14
TUTORIAL LABVIEW 2010 15 de agosto de 2012

EJEMPLO6:
DEL PROBLEMA ANTERIOR CONCATENAR LA FILA2 CON UNA CONSTANTE Y REEMPLAZAR EL
VALOR2 DE LA COLUMA1 POR EL NUMERO 100

SOLUCION:
      SOLUCIONAMOS ESTO CON LOS BLOQUES PRACTICOS BUILD Y EL REPLACE


       BUILD: CONCATENADOR

       REPLACE: REEMPLAZA VALORES.




                                                         ELECTRONICA PERÚ   15
TUTORIAL LABVIEW 2010 15 de agosto de 2012


   SE MUESTRA LA NUEVA COLUMNA CON LA POSICION REEMPLAZADA Y LA
    CONCATENACION DE LA FILA2 CON LA CONSTANTE.




                                                     ELECTRONICA PERÚ   16

Mais conteúdo relacionado

Semelhante a Arreglos

CIRC DIG CI PN02 Boole y Karnaugh Eval_por_estudiante.pdf
CIRC DIG CI PN02 Boole y Karnaugh Eval_por_estudiante.pdfCIRC DIG CI PN02 Boole y Karnaugh Eval_por_estudiante.pdf
CIRC DIG CI PN02 Boole y Karnaugh Eval_por_estudiante.pdfAVINADAD MENDEZ
 
Puertas logicas y sistemas combinacionales
Puertas logicas y sistemas combinacionalesPuertas logicas y sistemas combinacionales
Puertas logicas y sistemas combinacionalesCarlos Cardelo
 
Mate tema 5 operaciones con numeros decimales
Mate tema 5 operaciones con numeros decimalesMate tema 5 operaciones con numeros decimales
Mate tema 5 operaciones con numeros decimalesalexvelizarov
 
L09 sumador restador-binariode8bits
L09 sumador restador-binariode8bitsL09 sumador restador-binariode8bits
L09 sumador restador-binariode8bitsChristian Acuña
 
3.excel 2007-nivel-basico-formulas-y-funciones
3.excel 2007-nivel-basico-formulas-y-funciones3.excel 2007-nivel-basico-formulas-y-funciones
3.excel 2007-nivel-basico-formulas-y-funcionesJONAHTNAURIELROBLEDO
 
Excel 2007-nivel-basico-formulas-y-funciones
Excel 2007-nivel-basico-formulas-y-funcionesExcel 2007-nivel-basico-formulas-y-funciones
Excel 2007-nivel-basico-formulas-y-funcionesalexander barrios
 
Excel2007 nivelbasicoformulasyfunciones
Excel2007 nivelbasicoformulasyfuncionesExcel2007 nivelbasicoformulasyfunciones
Excel2007 nivelbasicoformulasyfuncionesRita Marlene
 
Centro de estudios_tecnologicos_industril_y_de_servicios_no(2)
Centro de estudios_tecnologicos_industril_y_de_servicios_no(2)Centro de estudios_tecnologicos_industril_y_de_servicios_no(2)
Centro de estudios_tecnologicos_industril_y_de_servicios_no(2)ArmandoC42
 
Cómo convertir decimales a octales
Cómo convertir decimales a octalesCómo convertir decimales a octales
Cómo convertir decimales a octaleskarJes
 
Reporte 4 word.
Reporte 4 word.Reporte 4 word.
Reporte 4 word.briant95
 
CONTADOR BINARIO 8 BITS
CONTADOR BINARIO 8 BITSCONTADOR BINARIO 8 BITS
CONTADOR BINARIO 8 BITSlalo martinez
 
Soluciones a cuetionario 3 tema 2.6
Soluciones a cuetionario 3 tema 2.6Soluciones a cuetionario 3 tema 2.6
Soluciones a cuetionario 3 tema 2.6gustavovq
 
Guia de excel inicial
Guia de excel inicialGuia de excel inicial
Guia de excel inicialCarlos Arturo
 

Semelhante a Arreglos (20)

CIRC DIG CI PN02 Boole y Karnaugh Eval_por_estudiante.pdf
CIRC DIG CI PN02 Boole y Karnaugh Eval_por_estudiante.pdfCIRC DIG CI PN02 Boole y Karnaugh Eval_por_estudiante.pdf
CIRC DIG CI PN02 Boole y Karnaugh Eval_por_estudiante.pdf
 
Puertas logicas y sistemas combinacionales
Puertas logicas y sistemas combinacionalesPuertas logicas y sistemas combinacionales
Puertas logicas y sistemas combinacionales
 
Mate tema 5 operaciones con numeros decimales
Mate tema 5 operaciones con numeros decimalesMate tema 5 operaciones con numeros decimales
Mate tema 5 operaciones con numeros decimales
 
L09 sumador restador-binariode8bits
L09 sumador restador-binariode8bitsL09 sumador restador-binariode8bits
L09 sumador restador-binariode8bits
 
3.excel 2007-nivel-basico-formulas-y-funciones
3.excel 2007-nivel-basico-formulas-y-funciones3.excel 2007-nivel-basico-formulas-y-funciones
3.excel 2007-nivel-basico-formulas-y-funciones
 
Excel 2007-nivel-basico-formulas-y-funciones
Excel 2007-nivel-basico-formulas-y-funcionesExcel 2007-nivel-basico-formulas-y-funciones
Excel 2007-nivel-basico-formulas-y-funciones
 
Excel2007 nivelbasicoformulasyfunciones
Excel2007 nivelbasicoformulasyfuncionesExcel2007 nivelbasicoformulasyfunciones
Excel2007 nivelbasicoformulasyfunciones
 
Guía arreglos
Guía arreglosGuía arreglos
Guía arreglos
 
Centro de estudios_tecnologicos_industril_y_de_servicios_no(2)
Centro de estudios_tecnologicos_industril_y_de_servicios_no(2)Centro de estudios_tecnologicos_industril_y_de_servicios_no(2)
Centro de estudios_tecnologicos_industril_y_de_servicios_no(2)
 
P27 fracciones y decimales ii solucion
P27 fracciones y decimales ii  solucionP27 fracciones y decimales ii  solucion
P27 fracciones y decimales ii solucion
 
P27 fracciones y decimales ii solucion
P27 fracciones y decimales ii  solucionP27 fracciones y decimales ii  solucion
P27 fracciones y decimales ii solucion
 
Cómo convertir decimales a octales
Cómo convertir decimales a octalesCómo convertir decimales a octales
Cómo convertir decimales a octales
 
estructuras flujogramas
estructuras flujogramasestructuras flujogramas
estructuras flujogramas
 
Luciano
LucianoLuciano
Luciano
 
Reporte compuertas logicas
Reporte compuertas logicas Reporte compuertas logicas
Reporte compuertas logicas
 
Reporte 4 word.
Reporte 4 word.Reporte 4 word.
Reporte 4 word.
 
Practica semaforo usando Relés
Practica semaforo usando Relés Practica semaforo usando Relés
Practica semaforo usando Relés
 
CONTADOR BINARIO 8 BITS
CONTADOR BINARIO 8 BITSCONTADOR BINARIO 8 BITS
CONTADOR BINARIO 8 BITS
 
Soluciones a cuetionario 3 tema 2.6
Soluciones a cuetionario 3 tema 2.6Soluciones a cuetionario 3 tema 2.6
Soluciones a cuetionario 3 tema 2.6
 
Guia de excel inicial
Guia de excel inicialGuia de excel inicial
Guia de excel inicial
 

Arreglos

  • 1. 15-8-2012 ELECTRONICA PERÚ TUTORIAL LABVIEW 2010 COMPARTE EL CONOCIMIENTO
  • 2. TUTORIAL LABVIEW 2010 15 de agosto de 2012 ARREGLOS EJEMPLO1: GENERAR UN ARRAY CON 7 ELEMENTOS Y UNA MATRIZ DE 5x4 CON NUMEROS ENTEROS SOLUCION: PARA GENERAR UN ARREGLO Y UNA MATRIZ HACEMOS USO DEL FOR (ASI COMO CUANDO PROGRAMAMOS EN C).  EN EL DIAGRAMA DE BLOQUES TENEMOS: ELECTRONICA PERÚ 1
  • 3. TUTORIAL LABVIEW 2010 15 de agosto de 2012  EL PANEL FRONTAL TENEMOS LOS VALORES GENERADOS PERO COMO NOS DAMOS CUANTA NO SON ENTEROS ESTO ES DEBIDO A QUE NUESTRO BLOQUE ARRAYXY(INDICADOR) SE ENCUENTRA EN DOBLE FLOAT. ELECTRONICA PERÚ 2
  • 4. TUTORIAL LABVIEW 2010 15 de agosto de 2012  PARA GENERAR LOS NUMEROS ENTEROS TENEMOS QUE CAMBIAR SU FORMATO Y ESTO LO HACEMOS DE LA SIGUIENTE MANERA: NOTAMOS QUE POR DEFECTO ESTA CONFIGURADO EN DOBLE FLOAT  SELECCIONAMOS EL FORMATO LONG(I32) QUE SON LOS ENTEROS LARGOS DE 32bit ELECTRONICA PERÚ 3
  • 5. TUTORIAL LABVIEW 2010 15 de agosto de 2012  AHORA TENEMOS EN EL DIAGRAMA DE BLOQUES :  Y EN EL PANEL FRONTAL OBSERVAMOS UN ARREGLO Y UNA MATRIZ CON NUMEROS ENTEROS. ELECTRONICA PERÚ 4
  • 6. TUTORIAL LABVIEW 2010 15 de agosto de 2012 EJEMPLO2: HACER UNA SUMA DE MATRICES REALES Y UNA SUMA DE MATRICES CON NUMEROS COMPLEJOS SOLUCION:  PARA INGRESAR DATOS DENTRO DE UNA MATRIZ NOS VAMOS AL PANEL FRONTAL Y SELECCIONAMOS RealMatrix.ctl y ComplexMatrix.ctl ELECTRONICA PERÚ 5
  • 7. TUTORIAL LABVIEW 2010 15 de agosto de 2012  CREAMOS CUATRO MATRICES DOS REALES Y DOS COMPLEJAS. ELECTRONICA PERÚ 6
  • 8. TUTORIAL LABVIEW 2010 15 de agosto de 2012  COMO YA TENEMOS LAS MATRICES EN REALES Y COMPLEJOS PARA SUMARLAS O RESTARLAS SIMPLEMENTE SELECCIONAMOS LOS BLOQUES DE SUMAR Y RESTAR LUEGO LES CREAMOS UN INDICADOR. ELECTRONICA PERÚ 7
  • 9. TUTORIAL LABVIEW 2010 15 de agosto de 2012  SUMAMOS RESTAMOS Y TENEMOS LA SUMA Y RESTA DE NUMEROS REALES Y COMPLEJOS ELECTRONICA PERÚ 8
  • 10. TUTORIAL LABVIEW 2010 15 de agosto de 2012 EJEMPLO3: CREAR UNA MATRIZ CON NUMEROS ENTEROS Y CALCULAR CUANTAS FILAS Y CUANTAS COLUMNAS TIENE. CREAR UN ARRAY Y CALCULAR EL NUMERO DE ELEMENTOS QUE TIENE SOLUCION:  PARA OTENER EL TAMAÑO DE UNA MATRIZ O UNA ARRAY HACEMOS USO DEL BLOQUE SIZE. ELECTRONICA PERÚ 9
  • 11. TUTORIAL LABVIEW 2010 15 de agosto de 2012  EN EL PANEL FRONTAL PARA LA MATRIZ INGRESAMOS EL NUMERO DE FILAS NUMERO DE COLUMNAS Y PARA EL ARRAY EL NUMERO DE ELEMENTOS ENTONCES NOTAMOS QUE EL SIZE CREADO CONCUERDA CON LO QUE INGRESAMOS, ESTE EJERCICIO SOLO ES PARA VER LA FUNCION DEL SIZE EL CUAL NOS SERA DE UTILIDAD EN FUTUROS EJEMPLOS. ELECTRONICA PERÚ 10
  • 12. TUTORIAL LABVIEW 2010 15 de agosto de 2012 EJEMPLO4: EXTRAER FILAS Y COLUMNAS DE UNA MATRIZ DE 6x4 SOLUCION:  PARA LOGRAR ESTO HACEMOS USO DEL BLOQUE INDEX EL CUAL PERMITE SEPARAR EN COLUMNAS O EN FILAS. ELECTRONICA PERÚ 11
  • 13. TUTORIAL LABVIEW 2010 15 de agosto de 2012  EN EL PANEL FRONTAL TENEMOS LA SEPARACION EN : COLUMA0 COLUMNA1 FILA 2 Y FILA 3. ELECTRONICA PERÚ 12
  • 14. TUTORIAL LABVIEW 2010 15 de agosto de 2012 EJEMPLO5: EXTRAER ELEMENTOS DE LA FILA3 APARTIR DE LA POSICION1 SOLUCION:  PARA LOGRAR ESO HACEMOS USO DEL BLOQUE ARRAY SUBSET EL CUAL ME PERMITE INGRESAR LA POSICION Y LA CANTIDAD DE DATOS QUE QUIERE EXTRAER APARTIR DE ESA POSICION. ELECTRONICA PERÚ 13
  • 15. TUTORIAL LABVIEW 2010 15 de agosto de 2012  SE NOTA LA EXTRACION DE ELEMENTOS DE LA FILA3, EL ARRAY SUBSET TIENE GRAN UTILIDAD CUANTO ADQUIRIMOS DATOS YA QUE TOMAMOS LA CANTIDAD DE DATOS DE UNA TRAMA O LOS DATOS MAS IMPORTANTES PARA REALIZAR UNA GRAFICA. ELECTRONICA PERÚ 14
  • 16. TUTORIAL LABVIEW 2010 15 de agosto de 2012 EJEMPLO6: DEL PROBLEMA ANTERIOR CONCATENAR LA FILA2 CON UNA CONSTANTE Y REEMPLAZAR EL VALOR2 DE LA COLUMA1 POR EL NUMERO 100 SOLUCION:  SOLUCIONAMOS ESTO CON LOS BLOQUES PRACTICOS BUILD Y EL REPLACE BUILD: CONCATENADOR REPLACE: REEMPLAZA VALORES. ELECTRONICA PERÚ 15
  • 17. TUTORIAL LABVIEW 2010 15 de agosto de 2012  SE MUESTRA LA NUEVA COLUMNA CON LA POSICION REEMPLAZADA Y LA CONCATENACION DE LA FILA2 CON LA CONSTANTE. ELECTRONICA PERÚ 16