SlideShare a Scribd company logo
1 of 7
CLASE DE MATLAB #1



1.

a=[2 5 7 4;-1 2 5 1;4 -1 7 8];

>> resul=rref(a)



resul =



     1.0000         0   0    0.9839

          0   1.0000    0 -0.3387

          0     0   1.0000   0.5323



>> syms a b w

>> dj=[a b;w a]



dj =



[ a, b]

[ w, a]



>> invdj=inv(dj);

>> dj*invdj



ans =
[ (b*w)/(b*w - a^2) - a^2/(b*w - a^2),                       0]

[                       0, (b*w)/(b*w - a^2) - a^2/(b*w - a^2)]



>> det(dj);

>> dj'



ans =



[ conj(a), conj(w)]

[ conj(b), conj(a)]

clc

clear
2.

>> x=[0:1:10];

>> y=sin(5*x);

>> plot(x,y)


         1

       0.8

       0.6

       0.4

       0.2

         0

      -0.2

      -0.4

      -0.6

      -0.8

        -1
             0   1   2   3   4   5   6   7   8   9   10




>> x=0:0.01:10;

>> y=sin(5*x);

>> plot(x,y)
1

        0.8

        0.6

        0.4

        0.2

          0

        -0.2

        -0.4

        -0.6

        -0.8

         -1
               0   1   2   3   4   5   6   7   8   9   10




3.

>> syms x

>> fx=sin(5*x);

>> dfx=diff(fx)



dfx =

5*cos(5*x)
>> ifx=int(fx)

ifx =

-cos(5*x)/5

Esta función es indefinida



4.

>> x=0:0.01:5;

>> fx=cos(sin(3*x.^2));

>> plot(x,fx)




          1

        0.95

         0.9

        0.85

         0.8

        0.75

         0.7

        0.65

         0.6

        0.55

         0.5
               0   0.5   1   1.5   2   2.5   3   3.5   4   4.5   5
>> syms x

>> fx=cos(sin(3*x.^2));

>> dfx=diff(fx);

>> ezplot(fx);

>> hold on

>> ezplot(dfx)



                          -6 x sin(sin(3 x 2)) cos(3 x 2)


        15


        10


         5


         0


         -5


       -10


       -15


              -6    -4    -2            0             2     4   6
                                        x
>> syms x y

>> fx=cos(sin(3*x.^2));

>> ezsurf(fx)

>> ezsurf(fx)




                               cos(sin(3 x 2))




        1


      0.9


      0.8


      0.7




            5
                                                         5
                     0
                                                     0
                          -5           -5
                      y                          x

More Related Content

What's hot

Matlab dc circuit analysis
Matlab dc circuit analysisMatlab dc circuit analysis
Matlab dc circuit analysisAmeen San
 
Limites trigonometricos1
Limites trigonometricos1Limites trigonometricos1
Limites trigonometricos1orvy
 
Find the output of the following code (Java for ICSE)
Find the output of the following code (Java for ICSE)Find the output of the following code (Java for ICSE)
Find the output of the following code (Java for ICSE)Mokshya Priyadarshee
 
Tabla integrales
Tabla integralesTabla integrales
Tabla integralesa99carlitos
 
The Ring programming language version 1.10 book - Part 28 of 212
The Ring programming language version 1.10 book - Part 28 of 212The Ring programming language version 1.10 book - Part 28 of 212
The Ring programming language version 1.10 book - Part 28 of 212Mahmoud Samir Fayed
 
Quinto Punto Parte B
Quinto Punto Parte BQuinto Punto Parte B
Quinto Punto Parte Bgustavo206
 
Robot Motion Source code
Robot Motion Source codeRobot Motion Source code
Robot Motion Source codeBrian Goggins
 
The Ring programming language version 1.5.1 book - Part 18 of 180
The Ring programming language version 1.5.1 book - Part 18 of 180The Ring programming language version 1.5.1 book - Part 18 of 180
The Ring programming language version 1.5.1 book - Part 18 of 180Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 23 of 196
The Ring programming language version 1.7 book - Part 23 of 196The Ring programming language version 1.7 book - Part 23 of 196
The Ring programming language version 1.7 book - Part 23 of 196Mahmoud Samir Fayed
 
OpenFOAM Programming Tips
OpenFOAM Programming TipsOpenFOAM Programming Tips
OpenFOAM Programming TipsFumiya Nozaki
 

What's hot (20)

CRL 1.8 Functions
CRL 1.8 FunctionsCRL 1.8 Functions
CRL 1.8 Functions
 
Gunplot
GunplotGunplot
Gunplot
 
Resoluçãohaskell2
Resoluçãohaskell2Resoluçãohaskell2
Resoluçãohaskell2
 
Matlab dc circuit analysis
Matlab dc circuit analysisMatlab dc circuit analysis
Matlab dc circuit analysis
 
93311880 limites-trigonometricos
93311880 limites-trigonometricos93311880 limites-trigonometricos
93311880 limites-trigonometricos
 
Img 0003
Img 0003Img 0003
Img 0003
 
Limites trigonometricos1
Limites trigonometricos1Limites trigonometricos1
Limites trigonometricos1
 
Find the output of the following code (Java for ICSE)
Find the output of the following code (Java for ICSE)Find the output of the following code (Java for ICSE)
Find the output of the following code (Java for ICSE)
 
MATHS SYMBOLS - #2 - EXPONENTIALS and LOGARITHMS
MATHS SYMBOLS - #2 - EXPONENTIALS and LOGARITHMSMATHS SYMBOLS - #2 - EXPONENTIALS and LOGARITHMS
MATHS SYMBOLS - #2 - EXPONENTIALS and LOGARITHMS
 
Tabla integrales
Tabla integralesTabla integrales
Tabla integrales
 
My favorite slides
My favorite slidesMy favorite slides
My favorite slides
 
The Ring programming language version 1.10 book - Part 28 of 212
The Ring programming language version 1.10 book - Part 28 of 212The Ring programming language version 1.10 book - Part 28 of 212
The Ring programming language version 1.10 book - Part 28 of 212
 
Primer Punto
Primer PuntoPrimer Punto
Primer Punto
 
Quinto Punto Parte B
Quinto Punto Parte BQuinto Punto Parte B
Quinto Punto Parte B
 
Robot Motion Source code
Robot Motion Source codeRobot Motion Source code
Robot Motion Source code
 
Vcs9
Vcs9Vcs9
Vcs9
 
Ejemplos De Metodo Simplex
Ejemplos De Metodo SimplexEjemplos De Metodo Simplex
Ejemplos De Metodo Simplex
 
The Ring programming language version 1.5.1 book - Part 18 of 180
The Ring programming language version 1.5.1 book - Part 18 of 180The Ring programming language version 1.5.1 book - Part 18 of 180
The Ring programming language version 1.5.1 book - Part 18 of 180
 
The Ring programming language version 1.7 book - Part 23 of 196
The Ring programming language version 1.7 book - Part 23 of 196The Ring programming language version 1.7 book - Part 23 of 196
The Ring programming language version 1.7 book - Part 23 of 196
 
OpenFOAM Programming Tips
OpenFOAM Programming TipsOpenFOAM Programming Tips
OpenFOAM Programming Tips
 

Similar to MATLAB Class #1: Introduction to Functions and Graphing in MATLAB

Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabkrishna_093
 
Superficies en maple
Superficies en mapleSuperficies en maple
Superficies en mapleaart07
 
Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語ikdysfm
 
Two step equations distributive
Two step equations   distributiveTwo step equations   distributive
Two step equations distributivemlabuski
 
Newton-Raphson Method
Newton-Raphson MethodNewton-Raphson Method
Newton-Raphson MethodJigisha Dabhi
 
EJERCICIOS DE VERANO PARA SEGUNDO DE ESO
EJERCICIOS DE VERANO PARA SEGUNDO DE ESOEJERCICIOS DE VERANO PARA SEGUNDO DE ESO
EJERCICIOS DE VERANO PARA SEGUNDO DE ESOangusoo
 
Systems%20of%20 three%20equations%20substitution
Systems%20of%20 three%20equations%20substitutionSystems%20of%20 three%20equations%20substitution
Systems%20of%20 three%20equations%20substitutionNene Thomas
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)asghar123456
 
Ejercicios de verano para primero de eso
Ejercicios de verano para primero de esoEjercicios de verano para primero de eso
Ejercicios de verano para primero de esoangusoo
 
INTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptxINTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptxDevaraj Chilakala
 

Similar to MATLAB Class #1: Introduction to Functions and Graphing in MATLAB (20)

Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Mat lab day 1
Mat lab day 1Mat lab day 1
Mat lab day 1
 
Superficies en maple
Superficies en mapleSuperficies en maple
Superficies en maple
 
Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語
 
Two step equations distributive
Two step equations   distributiveTwo step equations   distributive
Two step equations distributive
 
Newton-Raphson Method
Newton-Raphson MethodNewton-Raphson Method
Newton-Raphson Method
 
Ml lesson 4 4
Ml lesson 4 4Ml lesson 4 4
Ml lesson 4 4
 
Maximum and minimum
Maximum and minimumMaximum and minimum
Maximum and minimum
 
Lr4 math cad
Lr4 math cadLr4 math cad
Lr4 math cad
 
EJERCICIOS DE VERANO PARA SEGUNDO DE ESO
EJERCICIOS DE VERANO PARA SEGUNDO DE ESOEJERCICIOS DE VERANO PARA SEGUNDO DE ESO
EJERCICIOS DE VERANO PARA SEGUNDO DE ESO
 
Systems%20of%20 three%20equations%20substitution
Systems%20of%20 three%20equations%20substitutionSystems%20of%20 three%20equations%20substitution
Systems%20of%20 three%20equations%20substitution
 
Ecuaciones de primer grado
Ecuaciones de primer gradoEcuaciones de primer grado
Ecuaciones de primer grado
 
Ecuaciones de primer grado
Ecuaciones de primer gradoEcuaciones de primer grado
Ecuaciones de primer grado
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)
 
Matrix opt
Matrix optMatrix opt
Matrix opt
 
Ejercicios de verano para primero de eso
Ejercicios de verano para primero de esoEjercicios de verano para primero de eso
Ejercicios de verano para primero de eso
 
INTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptxINTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptx
 
Python.pdf
Python.pdfPython.pdf
Python.pdf
 
20100528
2010052820100528
20100528
 
20100528
2010052820100528
20100528
 

Recently uploaded

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 

MATLAB Class #1: Introduction to Functions and Graphing in MATLAB

  • 1. CLASE DE MATLAB #1 1. a=[2 5 7 4;-1 2 5 1;4 -1 7 8]; >> resul=rref(a) resul = 1.0000 0 0 0.9839 0 1.0000 0 -0.3387 0 0 1.0000 0.5323 >> syms a b w >> dj=[a b;w a] dj = [ a, b] [ w, a] >> invdj=inv(dj); >> dj*invdj ans =
  • 2. [ (b*w)/(b*w - a^2) - a^2/(b*w - a^2), 0] [ 0, (b*w)/(b*w - a^2) - a^2/(b*w - a^2)] >> det(dj); >> dj' ans = [ conj(a), conj(w)] [ conj(b), conj(a)] clc clear
  • 3. 2. >> x=[0:1:10]; >> y=sin(5*x); >> plot(x,y) 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 0 1 2 3 4 5 6 7 8 9 10 >> x=0:0.01:10; >> y=sin(5*x); >> plot(x,y)
  • 4. 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 0 1 2 3 4 5 6 7 8 9 10 3. >> syms x >> fx=sin(5*x); >> dfx=diff(fx) dfx = 5*cos(5*x)
  • 5. >> ifx=int(fx) ifx = -cos(5*x)/5 Esta función es indefinida 4. >> x=0:0.01:5; >> fx=cos(sin(3*x.^2)); >> plot(x,fx) 1 0.95 0.9 0.85 0.8 0.75 0.7 0.65 0.6 0.55 0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
  • 6. >> syms x >> fx=cos(sin(3*x.^2)); >> dfx=diff(fx); >> ezplot(fx); >> hold on >> ezplot(dfx) -6 x sin(sin(3 x 2)) cos(3 x 2) 15 10 5 0 -5 -10 -15 -6 -4 -2 0 2 4 6 x
  • 7. >> syms x y >> fx=cos(sin(3*x.^2)); >> ezsurf(fx) >> ezsurf(fx) cos(sin(3 x 2)) 1 0.9 0.8 0.7 5 5 0 0 -5 -5 y x