SlideShare a Scribd company logo
1 of 9
Benvinguts a la programació amb Matlab R2011a

        PERSONALITZACIÓ D’UN MSGBOX




      MATLAB (MATrix LABoratory) és un entorn de programació basat en matrius, àmpliament utilitzat en
      l’àmbit de l’enginyeria per la seva versalitat en la resolució de càlculs numèrics sense importar com de
      complexos siguin. Es caracteritza també per permetre visualitzar els resultats fàcilment i de diferents
      formes.

Joan Manel Macías Morales – AGOST 2012.
Personalització d’un msgbox de Matlab.                                                   Matlab 7.12.0 (R2011a)
                                                    1. INTRODUCCIÓ
INDEX.
1 INTRODUCCIÓ             1
2 OBJECTIU                2           Matlab disposa de tres
3 CURRENT FOLDER

4 IMPORT WIZARD
                          3
                                      icones per defecte.
                          5
5 WORKSPACE               6
6 COMMAND WINDOW          7




                          Fig 1. Icones de Matlab          Fig 2. Msgbox de Matlab sense icona ni missatges


      Un msgbox és, tal i com el seu nom indica, un missatge dins
       d’una caixa. Pot contenir, o no, qualsevol dels icones mostrats.
       I s’utilitza per a advertir a l’usuari sobre un avís, ajuda o
       incidència, respectivament, durant l’execució d’un programa.

Joan Manel Macías Morales – AGOST 2012.                                                                       1/7
Personalització d’un msgbox de Matlab.                                       Matlab 7.12.0 (R2011a)
                                          2. OBJECTIU
INDEX.
1 INTRODUCCIÓ             1
2 OBJECTIU                2        Carregar una imatge en
3 CURRENT FOLDER

4 IMPORT WIZARD
                          3
                                   un msgbox de Matlab.
                          5
5 WORKSPACE               6
6 COMMAND WINDOW          7




                                               Fig 3. Msgbox personalitzat



      Aquest és el msgbox personalitzat que es pretén mostrar. I al
       qual s’hi ha afegit una capçalera i un missatge.

Joan Manel Macías Morales – AGOST 2012.                                                    2/7
Personalització d’un msgbox de Matlab.    3. CURRENT                      Matlab 7.12.0 (R2011a)
                                            FOLDER
INDEX.
1 INTRODUCCIÓ             1
2 OBJECTIU                2        3.1 Activació finestra.
3 CURRENT FOLDER          3
3.1 Activació finestra    3
3.2 Selecció imatge       4
4 IMPORT WIZARD           5
5 WORKSPACE               6
6 COMMAND WINDOW          7



    En cas de no tenir activa la
     finestra Current Folder, només cal
     anar a la pestanya DESKTOP del
     menú principal i activar-la. Idem
     procediment per a activar les
                                                 Fig 4. Activació de finestres de treball
     demés finestres de Matlab.

Joan Manel Macías Morales – AGOST 2012.                                                     3/7
Personalització d’un msgbox de Matlab.    3. CURRENT                              Matlab 7.12.0 (R2011a)
                                            FOLDER
INDEX.
1 INTRODUCCIÓ             1
2 OBJECTIU                2        3.2 Selecció de la imatge.
3 CURRENT FOLDER          3
3.1 Activació finestra    3
3.2 Selecció imatge       4
4 IMPORT WIZARD           5
5 WORKSPACE               6
6 COMMAND WINDOW          7



    Amb el botó esquerre del ratolí
     es clica sobre el fitxer que conté
     la imatge desitjada. Aquest fitxer
     estarà emmagatzemat en una
     carpeta que es localitza a través
                                             Fig 5. Finestra Current Folder on seleccionar la imatge.
     de la finestra Current Folder.

Joan Manel Macías Morales – AGOST 2012.                                                                 4/7
Personalització d’un msgbox de Matlab.                                                   Matlab 7.12.0 (R2011a)
                                          4. IMPORT WIZARD
INDEX.
1 INTRODUCCIÓ             1
2 OBJECTIU                2        Importar una imatge.
3 CURRENT FOLDER          3
4 IMPORT WIZARD           5
5 WORKSPACE               6
6 COMMAND WINDOW          7




                                            Fig 6. Importar imatge a través del Command Wizard



      Un cop seleccionada la imatge, apareix la finestra Import Wizard
       amb tota la informació sobre la imatge. I acte seguit, es prem el
       botó Finish.

Joan Manel Macías Morales – AGOST 2012.                                                                5/7
Personalització d’un msgbox de Matlab.                                                  Matlab 7.12.0 (R2011a)
                                          5. WORKSPACE
INDEX.
1 INTRODUCCIÓ             1
2 OBJECTIU                2        Emmagatzemar dades.
3 CURRENT FOLDER          3
4 IMPORT WIZARD           5
5 WORKSPACE               6
6 COMMAND WINDOW          7




                                          Fig 7. Emmagatzematge d’informació de la imatge



      La informació obtinguda al importar la imatge es guarda
       automàticament en el Workspace, tal i com es mostra a la
       figura. Cal activar aquesta finestra per a veure-ho.

Joan Manel Macías Morales – AGOST 2012.                                                               6/7
Personalització d’un msgbox de Matlab.            6. COMMAND                                        Matlab 7.12.0 (R2011a)
                                                     WINDOW
INDEX.
1 INTRODUCCIÓ               1
2 OBJECTIU                  2         Escriure instruccions.
3 CURRENT FOLDER            3
4 IMPORT WIZARD             5
5 WORKSPACE                 6
6 COMMAND WINDOW            7



                                                        Fig 8. Entrada d’intruccions i resultat final



      I per a finalitzar s’escriuen les següents intruccions en la
       finestra Command Window :

        Dada=estelada;
        h=msgbox({'Ha arribat l’hora de dir PROU a Espanya.','','','',...
        'MANIFESTAT EL PROPER ONZE DE SETEMBRE DE 2012.',...
        '','','','        Visca Catalunya Lliure !','','',''},...
        'A tots els catalans i catalanes.','custom',Dada);

Joan Manel Macías Morales – AGOST 2012.                                                                           7/7
Matlab 7.12.0 (R2011a)



          PERSONALITZACIÓ D’UN MSGBOX AMB MATLAB.




                                     --- FI ---
Joan Manel Macías Morales – AGOST 2012.

More Related Content

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Personalització d'un msgbox de Matlab

  • 1. Benvinguts a la programació amb Matlab R2011a PERSONALITZACIÓ D’UN MSGBOX MATLAB (MATrix LABoratory) és un entorn de programació basat en matrius, àmpliament utilitzat en l’àmbit de l’enginyeria per la seva versalitat en la resolució de càlculs numèrics sense importar com de complexos siguin. Es caracteritza també per permetre visualitzar els resultats fàcilment i de diferents formes. Joan Manel Macías Morales – AGOST 2012.
  • 2. Personalització d’un msgbox de Matlab. Matlab 7.12.0 (R2011a) 1. INTRODUCCIÓ INDEX. 1 INTRODUCCIÓ 1 2 OBJECTIU 2 Matlab disposa de tres 3 CURRENT FOLDER 4 IMPORT WIZARD 3 icones per defecte. 5 5 WORKSPACE 6 6 COMMAND WINDOW 7 Fig 1. Icones de Matlab Fig 2. Msgbox de Matlab sense icona ni missatges  Un msgbox és, tal i com el seu nom indica, un missatge dins d’una caixa. Pot contenir, o no, qualsevol dels icones mostrats. I s’utilitza per a advertir a l’usuari sobre un avís, ajuda o incidència, respectivament, durant l’execució d’un programa. Joan Manel Macías Morales – AGOST 2012. 1/7
  • 3. Personalització d’un msgbox de Matlab. Matlab 7.12.0 (R2011a) 2. OBJECTIU INDEX. 1 INTRODUCCIÓ 1 2 OBJECTIU 2 Carregar una imatge en 3 CURRENT FOLDER 4 IMPORT WIZARD 3 un msgbox de Matlab. 5 5 WORKSPACE 6 6 COMMAND WINDOW 7 Fig 3. Msgbox personalitzat  Aquest és el msgbox personalitzat que es pretén mostrar. I al qual s’hi ha afegit una capçalera i un missatge. Joan Manel Macías Morales – AGOST 2012. 2/7
  • 4. Personalització d’un msgbox de Matlab. 3. CURRENT Matlab 7.12.0 (R2011a) FOLDER INDEX. 1 INTRODUCCIÓ 1 2 OBJECTIU 2 3.1 Activació finestra. 3 CURRENT FOLDER 3 3.1 Activació finestra 3 3.2 Selecció imatge 4 4 IMPORT WIZARD 5 5 WORKSPACE 6 6 COMMAND WINDOW 7  En cas de no tenir activa la finestra Current Folder, només cal anar a la pestanya DESKTOP del menú principal i activar-la. Idem procediment per a activar les Fig 4. Activació de finestres de treball demés finestres de Matlab. Joan Manel Macías Morales – AGOST 2012. 3/7
  • 5. Personalització d’un msgbox de Matlab. 3. CURRENT Matlab 7.12.0 (R2011a) FOLDER INDEX. 1 INTRODUCCIÓ 1 2 OBJECTIU 2 3.2 Selecció de la imatge. 3 CURRENT FOLDER 3 3.1 Activació finestra 3 3.2 Selecció imatge 4 4 IMPORT WIZARD 5 5 WORKSPACE 6 6 COMMAND WINDOW 7  Amb el botó esquerre del ratolí es clica sobre el fitxer que conté la imatge desitjada. Aquest fitxer estarà emmagatzemat en una carpeta que es localitza a través Fig 5. Finestra Current Folder on seleccionar la imatge. de la finestra Current Folder. Joan Manel Macías Morales – AGOST 2012. 4/7
  • 6. Personalització d’un msgbox de Matlab. Matlab 7.12.0 (R2011a) 4. IMPORT WIZARD INDEX. 1 INTRODUCCIÓ 1 2 OBJECTIU 2 Importar una imatge. 3 CURRENT FOLDER 3 4 IMPORT WIZARD 5 5 WORKSPACE 6 6 COMMAND WINDOW 7 Fig 6. Importar imatge a través del Command Wizard  Un cop seleccionada la imatge, apareix la finestra Import Wizard amb tota la informació sobre la imatge. I acte seguit, es prem el botó Finish. Joan Manel Macías Morales – AGOST 2012. 5/7
  • 7. Personalització d’un msgbox de Matlab. Matlab 7.12.0 (R2011a) 5. WORKSPACE INDEX. 1 INTRODUCCIÓ 1 2 OBJECTIU 2 Emmagatzemar dades. 3 CURRENT FOLDER 3 4 IMPORT WIZARD 5 5 WORKSPACE 6 6 COMMAND WINDOW 7 Fig 7. Emmagatzematge d’informació de la imatge  La informació obtinguda al importar la imatge es guarda automàticament en el Workspace, tal i com es mostra a la figura. Cal activar aquesta finestra per a veure-ho. Joan Manel Macías Morales – AGOST 2012. 6/7
  • 8. Personalització d’un msgbox de Matlab. 6. COMMAND Matlab 7.12.0 (R2011a) WINDOW INDEX. 1 INTRODUCCIÓ 1 2 OBJECTIU 2 Escriure instruccions. 3 CURRENT FOLDER 3 4 IMPORT WIZARD 5 5 WORKSPACE 6 6 COMMAND WINDOW 7 Fig 8. Entrada d’intruccions i resultat final  I per a finalitzar s’escriuen les següents intruccions en la finestra Command Window :  Dada=estelada;  h=msgbox({'Ha arribat l’hora de dir PROU a Espanya.','','','',...  'MANIFESTAT EL PROPER ONZE DE SETEMBRE DE 2012.',...  '','','',' Visca Catalunya Lliure !','','',''},...  'A tots els catalans i catalanes.','custom',Dada); Joan Manel Macías Morales – AGOST 2012. 7/7
  • 9. Matlab 7.12.0 (R2011a) PERSONALITZACIÓ D’UN MSGBOX AMB MATLAB. --- FI --- Joan Manel Macías Morales – AGOST 2012.