Vous êtes sur la page 1sur 38

Practica NRO 1 1.1 Comando de ayuda: Matlab tiene ayuda muy bien documentada.

Tipeando help matlab despliega un ndice con aclaraciones que sirven para orientarse a la hora de buscar algn comando en particular.

>> help
HELP topics: Documents\MATLAB matlab\general matlab\ops matlab\lang matlab\elmat matlab\randfun matlab\elfun matlab\specfun matlab\matfun matlab\datafun matlab\polyfun matlab\funfun matlab\sparfun matlab\scribe matlab\graph2d matlab\graph3d matlab\specgraph matlab\graphics matlab\uitools matlab\strfun matlab\imagesci matlab\iofun matlab\audiovideo matlab\timefun matlab\datatypes matlab\verctrl matlab\codetools matlab\helptools matlab\winfun winfun\NET matlab\demos matlab\timeseries matlab\hds matlab\guide matlab\plottools toolbox\local shared\controllib shared\dastudio matlab\datamanager matlabxl\matlabxl simulink\simulink simulink\blocks simulink\components - (No table of contents file) - General purpose commands. - Operators and special characters. - Programming language constructs. - Elementary matrices and matrix manipulation. - Random matrices and random streams. - Elementary math functions. - Specialized math functions. - Matrix functions - numerical linear algebra. - Data analysis and Fourier transforms. - Interpolation and polynomials. - Function functions and ODE solvers. - Sparse matrices. - Annotation and Plot Editing. - Two dimensional graphs. - Three dimensional graphs. - Specialized graphs. - Handle Graphics. - Graphical User Interface Tools. - Character strings. - Image and scientific data input/output. - File input and output. - Audio and Video support. - Time and dates. - Data types and structures. - Version control. - Commands for creating and debugging code - Help commands. - Windows Operating System Interface Files (COM/DDE) - Using .NET from within MATLAB - Examples and demonstrations. - Time series data visualization and exploration. - (No table of contents file) - Graphical User Interface Tools. - Graphical User Interface Tools. - General preferences and configuration information. - Control Library - (No table of contents file) - (No table of contents file) - MATLAB Builder EX - Simulink - Simulink block library. - Simulink components.

simulink\fixedandfloat - Simulink Fixed Point utilities. fixedandfloat\fxpdemos - Simulink Fixed Point Demos fixedandfloat\obsolete - (No table of contents file) simulink\simdemos - Simulink demonstrations and examples. simdemos\aerospace - Simulink: Aerospace model demonstrations and samples. simdemos\automotive - Simulink: Automotive model demonstrations and samples. simdemos\simfeatures - Simulink: Feature demonstrations and samples. simdemos\simgeneral - Simulink: General model demonstrations and samples. simulink\dee - Differential Equation Editor dastudio\depviewer - (No table of contents file) stateflow\stateflow - Stateflow rtw\rtw - Real-Time Workshop shared\sigbldr - (No table of contents file) simulink\modeladvisor - (No table of contents file) simulink\MPlayIO - (No table of contents file) shared\hdlshared - HDL Library rtw\accel - (No table of contents file) stateflow\sfdemos - Stateflow demonstrations and samples. stateflow\coder - Stateflow Coder rtw\rtwdemos - (No table of contents file) rtwdemos\rsimdemos - (No table of contents file) asap2\asap2 - (No table of contents file) can\blocks - (No table of contents file) configuration\resource - (No table of contents file) common\tgtcommon - (No table of contents file) targets\connectivity - (No table of contents file) targets\pil - (No table of contents file) rtwin\rtwin - Real-Time Windows Target aero\aero - Aerospace Toolbox aero\astdemos - (No table of contents file) shared\mapgeodesy - Geometric Geodesy Functions aeroblks\aeroblks - Aerospace Blockset aeroblks\aerodemos - Aerospace Blockset demonstrations and examples. AUTOSAR\AUTOSAR - (No table of contents file) bioinfo\bioinfo - Bioinformatics Toolbox bioinfo\biolearning - Bioinformatics Toolbox -- Statistical Learning functions. bioinfo\microarray - Bioinformatics Toolbox -- Microarray support functions. bioinfo\mass_spec - Bioinformatics Toolbox -- Mass spectrometry data analysis functions. bioinfo\proteins - Bioinformatics Toolbox -- Protein analysis tools. bioinfo\biomatrices - Bioinformatics Toolbox -- Sequence similarity scoring matrices. bioinfo\biodemos - Bioinformatics Toolbox -- Tutorials, demos and examples. bioinfo\graphtheory - Bioinformatics Toolbox -- Graph Theory functions. c166\c166 - Target Support Package IC1 c166\blocks - (No table of contents file) c166\c166demos - (No table of contents file) can\canblks - (No table of contents file) can\canmasks - (No table of contents file) can\canmex - (No table of contents file) shared\can - (No table of contents file) shared\testmeaslib - (No table of contents file) ccslink\ccslink - Embedded IDE Link CC

ccslink\util - (No table of contents file) ccslink\ccsblks - (No table of contents file) ccslink\ccslinkblks - (No table of contents file) ccslinkblks\rtdxsimblks - (No table of contents file) ccslink\ccsdemos - Embedded IDE Link CC Demos ccsdemos\util - (No table of contents file) ccslink\mdlinfo - (No table of contents file) ccslink\tfl - (No table of contents file) ccslink\lic - (No table of contents file) ccslink\ccsblks - (No table of contents file) etargets\etargets - (No table of contents file) autointerface\util - (No table of contents file) idelinks\pjtgenerator - (No table of contents file) pjtgenerator\hookpoints - (No table of contents file) pjtgenerator\tgtpref - (No table of contents file) pjtgenerator\mdlinfo - (No table of contents file) pjtgenerator\blks - (No table of contents file) idelinks\errorhandler - (No table of contents file) blks\utils - (No table of contents file) comm\comm - Communications Toolbox comm\commdemos - Communications Toolbox Demos. comm\examples - Communications Toolbox Documentation Examples. comm\commobsolete - Archived MATLAB Files from Communications Toolbox Version 1.5. commblks\commblks - Communications Blockset commblks\commmasks - Communications Blockset library block mask helper functions. commblks\commmex - Communications Blockset S-function MEX-files. commblks\commblksdemos - Communications Blockset Demos. commblksobsolete\v3 - (No table of contents file) commblksobsolete\v2p5 - (No table of contents file) commblksobsolete\v2 - (No table of contents file) toolbox\compiler - MATLAB Compiler control\control - Control System Toolbox control\ctrlguis - Control System Toolbox -- Visualization and plot manipulation. control\ctrlobsolete - Control System Toolbox -- obsolete commands. control\ctrlutil - Control System Toolbox -- Utilities and MEX files. control\ctrldemos - Control System Toolbox -- Demos. shared\slcontrollib - Simulink Control Design Library curvefit\curvefit - Curve Fitting Toolbox curvefit\cftoolgui - (No table of contents file) curvefit\sftoolgui - (No table of contents file) shared\optimlib - Optimization Toolbox Library daq\daq - Data Acquisition Toolbox daq\daqguis - Data Acquisition Toolbox - Data Acquisition Soft Instruments. daq\daqdemos - Data Acquisition Toolbox - Data Acquisition Demos. daqblks\daqblks - (No table of contents file) daqblks\daqmasks - (No table of contents file) daqblks\daqmex - (No table of contents file) database\database - Database Toolbox database\dbdemos - Database Toolbox Demonstration Functions. database\vqb - Visual Query Builder functions. datafeed\datafeed - Datafeed Toolbox datafeed\dfgui - Datafeed Toolbox Graphical User Interface

des\desblks - SimEvents des\desmasks - (No table of contents file) des\desmex - (No table of contents file) des\desdemos - SimEvents Demos. discovery\discovery - EDA Simulator Link DS discovery\discoverydemos - (No table of contents file) shared\hdllink - (No table of contents file) toolbox\distcomp - Parallel Computing Toolbox distcomp\distcomp - (No table of contents file) distcomp\user - (No table of contents file) distcomp\mpi - (No table of contents file) distcomp\pctdemos - (No table of contents file) distcomp\parallel - Parallel Algorithms parallel\datafun - (No table of contents file) parallel\datatypes - (No table of contents file) parallel\elfun - (No table of contents file) parallel\elmat - (No table of contents file) parallel\lapack - (No table of contents file) parallel\matfun - (No table of contents file) parallel\ops - (No table of contents file) parallel\sparfun - (No table of contents file) parallel\specfun - (No table of contents file) parallel\util - (No table of contents file) distcomp\lang - Parallel computing programming language constructs. distcomp\worker - MATLAB Distributed Computing Server dotnetbuilder\dotnetbuilder - MATLAB Builder NE dspblks\dspblks - Signal Processing Blockset dspblks\dspmasks - Signal Processing Blockset mask helper functions. dspblks\dspmex - DSP Blockset S-Function MEX-files. dspblks\dspdemos - Signal Processing Blockset demonstrations and examples. shared\filterdesignlib - (No table of contents file) targets\ecoder - Real-Time Workshop Embedded Coder ecoder\ecoderdemos - (No table of contents file) mpt\mpt - Module Packaging Features mpt\user_specific - (No table of contents file) econ\econ - Econometrics Toolbox econ\econdemos - Econometrics Toolbox: Demos, Examples, and Data. eml\eml - (No table of contents file) emlcoder\emlcoder - Embedded MATLAB Coder. toolbox\exlink - Spreadsheet Link EX filterdesign\filterdesign - Filter Design Toolbox filterdesign\quantization - (No table of contents file) filterdesign\filtdesdemos - (No table of contents file) finance\finance - Financial Toolbox finance\calendar - Financial Toolbox calendar functions. finance\findemos - Financial Toolbox demonstration functions. finance\finsupport - (No table of contents file) finance\ftseries - Financial Toolbox Times Series Functions. finderiv\finderiv - Financial Derivatives Toolbox finfixed\finfixed - Fixed-Income Toolbox finfixed\finfixdemos - (No table of contents file) fixedpoint\fixedpoint - Fixed-Point Toolbox fixedpoint\fidemos - (No table of contents file) fixedpoint\fixedpointtool - (No table of contents file)

toolbox\fixpoint - Simulink Fixed Point fuzzy\fuzzy - Fuzzy Logic Toolbox fuzzy\fuzdemos - Fuzzy Logic Toolbox Demos. gads\gads - Genetic Algorithm and Direct Search Toolbox gads\gadsdemos - Genetic Algorithm and Direct Search Toolbox Demos toolbox\gauges - Gauges Blockset hdlcoder\hdlcoder - Simulink HDL Coder hdlcoder\hdlcoderdemos - Simulink HDL Coder Demos hdlfilter\hdlfilter - Filter Design HDL Coder hdlfilter\hdlfiltdemos - Filter Design HDL Coder Demos ident\ident - System Identification Toolbox ident\nlident - Nonlinear System Identification features. Type "help ident" for more info. ident\idobsolete - (No table of contents file) ident\idguis - (No table of contents file) ident\idutils - (No table of contents file) ident\iddemos - (No table of contents file) iddemos\examples - (No table of contents file) images\colorspaces - Image Processing Toolbox --- colorspaces images\images - Image Processing Toolbox images\imdemos - Image Processing Toolbox --- demos and sample images images\imuitools - Image Processing Toolbox --- imuitools images\iptformats - Image Processing Toolbox --- File Formats images\iptutils - Image Processing Toolbox --- utilities shared\imageslib - Image Processing Toolbox Library shared\spcuilib - (No table of contents file) imaq\imaq - Image Acquisition Toolbox shared\imaqlib - Image Acquisition Toolbox Library imaq\imaqdemos - Image Acquisition Toolbox. imaqblks\imaqblks - (No table of contents file) imaqblks\imaqmasks - (No table of contents file) imaqblks\imaqmex - (No table of contents file) incisive\incisive - EDA Simulator Link IN incisive\incisivedemos - (No table of contents file) instrument\instrument - Instrument Control Toolbox instrument\instrumentdemos - (No table of contents file) instrumentblks\instrumentblks - (No table of contents file) instrumentblks\instrumentmex - (No table of contents file) instrumentblks\instrumentmasks - (No table of contents file) javabuilder\javabuilder - MATLAB Builder JA map\map - Mapping Toolbox map\mapdemos - Mapping Toolbox Demos and Sample Data Sets. map\mapdisp - (No table of contents file) map\mapformats - (No table of contents file) map\mapproj - (No table of contents file) map\maputils - (No table of contents file) mbc\mbc - Model-Based Calibration Toolbox mbc\mbcdata - Model-Based Calibration Toolbox private utilities. mbc\mbcdemos - (No table of contents file) mbc\mbcdesign - Model-Based Calibration Toolbox private utilities. mbc\mbcexpr - Model-Based Calibration Toolbox private utilities. mbc\mbcguitools - Model-Based Calibration Toolbox private utilities. mbc\mbclayouts - Model-Based Calibration Toolbox private utilities. mbc\mbcmodels - Model-Based Calibration Toolbox private utilities. mbc\mbcsimulink - Model-Based Calibration Toolbox private utilities.

mbc\mbctools - Model-Based Calibration Toolbox private utilities. mbc\mbcview - Model-Based Calibration Toolbox private utilities. slvnv\simcoverage - Simulink Model Coverage Tool modelsim\modelsim - EDA Simulator Link MQ modelsim\modelsimdemos - (No table of contents file) mpc\mpc - Model Predictive Control Toolbox mpc\mpcdemos - (No table of contents file) mpc\mpcguis - (No table of contents file) mpc\mpcobsolete - Contents of the previous (obsolete) version of MPC Toolbox mpc\mpcutils - (No table of contents file) common\configuration - (No table of contents file) mpc555dk\mpc555demos - (No table of contents file) mpc555dk\mpc555dk - Target Support Package FM5 blockset\mfiles - (No table of contents file) rt\blockset - (No table of contents file) multilink\multilink - Embedded IDE Link MU multilink\util - (No table of contents file) multilink\multidemos - Embedded IDE Link MU Demos multilink\mdlinfo - (No table of contents file) multilink\multiblks - (No table of contents file) lfsocket\lfsocket - (No table of contents file) multilink\tfl - (No table of contents file) toolbox\nnet - Neural Network Toolbox nnet\nncontrol - Neural Network Toolbox Control System Functions. nnet\nndemos - Neural Network Demonstrations and Applications nnet\nnet - (No table of contents file) nnet\nnanalyze - (No table of contents file) nnet\nncustom - (No table of contents file) nnet\nndistance - (No table of contents file) nnet\nnformat - (No table of contents file) nnet\nninit - (No table of contents file) nnet\nnlearn - (No table of contents file) nnet\nnnetinput - (No table of contents file) nnet\nnnetwork - (No table of contents file) nnet\nnperformance - (No table of contents file) nnet\nnplot - (No table of contents file) nnet\nnprocess - (No table of contents file) nnet\nnsearch - (No table of contents file) nnet\nntopology - (No table of contents file) nnet\nntrain - (No table of contents file) nnet\nntransfer - (No table of contents file) nnet\nnweight - (No table of contents file) nnguis\nftool - (No table of contents file) nnguis\nntool - (No table of contents file) nnet\nnobsolete - Neural Network Toolbox nnet\nnutils - Neural Network Toolbox nnguis\nnguiutils - (No table of contents file) nndemos\nndatasets - (No table of contents file) nnguis\nntraintool - (No table of contents file) opc\opc - OPC Toolbox opc\opcgui - (No table of contents file) opc\opcdemos - OPC Toolbox - OPC Demos opcdemos\opcblksdemos - OPC Toolbox Block Library Demos. opcblks\opcblks - OPC Toolbox Block Library Support Functions.

optim\optim - Optimization Toolbox optim\optimdemos - Demonstrations of large-scale methods. toolbox\pde - Partial Differential Equation Toolbox data_manager\data_manager - (No table of contents file) drive\drive - SimDriveline drive\drivedemos - (No table of contents file) elec\elec - SimElectronics elec\elecdemos - (No table of contents file) foundation\foundation - (No table of contents file) mech\importer - (No table of contents file) mech\mech - SimMechanics mech\mechdemos - SimMechanics Demos. network_engine\ne_sli - (No table of contents file) network_engine\network_engine - (No table of contents file) pm_sli\pm_sli - (No table of contents file) DR\DRdemo - (No table of contents file) drives\drivesdemo - (No table of contents file) powersys\powerdemo - SimPowerSystems Demos powersys\powersys - SimPowerSystems sh\sh - SimHydraulics sh\shdemos - (No table of contents file) simscape\simscape - Simscape unit_manager\unit_manager - (No table of contents file) slvnv\reqmgt - Requirements Management Interface. slvnv\rmidemos - (No table of contents file) rf\rf - RF Toolbox rf\rfdemos - RF Toolbox Demos. rf\rftool - RF Tool (GUI) rfblks\rfblks - RF Blockset rfblks\rfblksmasks - RF Blockset mask helper functions. rfblks\rfblksmex - RF Blockset S-functions. rfblks\rfblksdemos - RF Blockset Demos. robust\robust - Robust Control Toolbox robust\rctlmi - Robust Control Toolbox - LMI Solvers. robust\rctutil - (No table of contents file) robust\rctdemos - (No table of contents file) rctobsolete\lmi - (No table of contents file) mutools\commands - (No table of contents file) mutools\subs - Utilities for obsolete MUTOOLS commands. rptgen\rptgen - MATLAB Report Generator rptgen\rptgendemos - (No table of contents file) rptgen\rptgenv1 - (No table of contents file) rptgenext\rptgenext - Simulink Report Generator rptgenext\rptgenextdemos - (No table of contents file) rptgenext\rptgenextv1 - (No table of contents file) rptgenext\slxmlcomp - (No table of contents file) signal\signal - Signal Processing Toolbox signal\sigtools - (No table of contents file) signal\sptoolgui - (No table of contents file) signal\sigdemos - (No table of contents file) simbio\simbio - SimBiology simbio\simbiodemos - SimBiology Demos shared\statslib - Statistics Toolbox Library sl3d\sl3d - Simulink 3D Animation sl3d\sl3ddemos - Simulink 3D Animation examples.

slcontrol\slcontrol - Simulink Control Design slcontrol\slctrlguis - (No table of contents file) slcontrol\slctrlutil - (No table of contents file) slcontrol\slctrldemos - (No table of contents file) sldo\sldo - Simulink Design Optimization sldo\sldodemos - Simulink Design Optimization Demos. sldodemos\optim - (No table of contents file) sldodemos\estim - (No table of contents file) sloptim\sloptim - (No table of contents file) sloptim\sloptguis - (No table of contents file) sloptim\sloptobsolete - (No table of contents file) slestim\slestguis - (No table of contents file) slestim\slestim - (No table of contents file) slestim\slestmex - Simulink Design Optimization Estimation S-Function MEXfiles. slestim\slestutil - (No table of contents file) sldv\sldv - Simulink Design Verifier sldv\sldvdemos - (No table of contents file) shared\sldv - (No table of contents file) slvnv\slvnv - Simulink Verification and Validation slvnv\simcovdemos - (No table of contents file) toolbox\splines - Spline Toolbox toolbox\stats - Statistics Toolbox toolbox\symbolic - Symbolic Math Toolbox systemtest\systemtest - SystemTest systemtest\systemtestdemos - SystemTest demonstrations and examples. systemtest\viewer - (No table of contents file) tasking\tasking - Embedded IDE Link TS tasking\taskingdemos - (No table of contents file) tic2000\tic2000 - Target Support Package TC2 tic2000\tic2000blks - (No table of contents file) tic2000\tic2000demos - (No table of contents file) etargets\mdlinfo - (No table of contents file) etargets\lic - (No table of contents file) etargets\peripheralTab - (No table of contents file) etargets\rtdxblks - RTDX (tm) Blocks etargets\demoutils - (No table of contents file) tic6000\tic6000 - Target Support Package TC6 tic6000\tfl - (No table of contents file) tic6000\tic6000blks - TI C6000 (tm) Blocks tic6000\tic6000demos - Embedded Target for TI C6000 DSP(tm) Demos vdsplink\vdsplink - Embedded IDE Link VS vdsplink\util - (No table of contents file) vdsplink\vdspdemos - Embedded IDE Link VS Demos vdsplink\mdlinfo - (No table of contents file) vdsplink\tfl - (No table of contents file) vdsplink\vdspblks - (No table of contents file) vipblks\vipblks - Video and Image Processing Blockset vipblks\vipmasks - (No table of contents file) vipblks\vipmex - (No table of contents file) vipblks\vipdemos - Video and Image Processing Blockset demonstrations and examples. vnt\vnt - Vehicle Network Toolbox vnt\vntguis - (No table of contents file) vnt\vntdemos - (No table of contents file)

vntblks\vntblks - (No table of contents file) vntblks\vntmasks - (No table of contents file) wavelet\wavelet - Wavelet Toolbox wavelet\wmultisig1d - (No table of contents file) wavelet\wavedemo - (No table of contents file) wavelet\compression - (No table of contents file) xpc\xpc - xPC Target xpcblocks\thirdpartydrivers - (No table of contents file) build\xpcblocks - (No table of contents file) xpc\xpcdemos - xPC Target -- demos and sample script files. kernel\embedded - xPC Target Embedded Option Ejercicios 1. Utilizando la funcin ayuda (help), obtener informacin de algunas de estas funciones elementales de matemticas: seno, coseno, tangente, arcoseno, arcotangente, secante, cosecante, cotangente, arco secante, arco cotangente, seno hiperblico, coseno hiperblico, acosh, atanh, exponencial, log, log10, log2, sign. >>helpfun

SIN Sine of argument in radians. SIN(X) is the sine of the elements of X. See also asin, sind. Overloaded methods: codistributed/sin
Reference page in Help browser doc sin Cosine of argument in radians. COS(X) is the cosine of the elements of X. See also acos, cosd. Overloaded methods: codistributed/cos Reference page in Help browser doc cos

COS

TAN Tangent of argument in radians. TAN(X) is the tangent of the elements of X.


See also atan, tand, atan2. Overloaded methods: codistributed/tan Reference page in Help browser doc tan

ASIN Inverse sine, result in radians. ASIN(X) is the arcsine of the elements of X. Complex results are obtained if ABS(x) > 1.0 for some element.

See also sin, asind. Overloaded methods: codistributed/asin Reference page in Help browser doc asin

ATAN Inverse tangent, result in radians. ATAN(X) is the arctangent of the elements of X. See also atan2, tan, atand. Overloaded methods: codistributed/atan Reference page in Help browser doc atan
Secant of argument in radians. SEC(X) is the secant of the elements of X. Class support for input X: float: double, single See also asec, secd. Overloaded methods: codistributed/sec Reference page in Help browser doc sec Cosecant of argument in radians. CSC(X) is the cosecant of the elements of X. Class support for input X: float: double, single See also acsc, cscd. Overloaded methods: codistributed/csc Reference page in Help browser doc csc Cotangent of argument in radians. COT(X) is the cotangent of the elements of X. Class support for input X: float: double, single See also acot, cotd. Overloaded methods: codistributed/cot Reference page in Help browser doc cot

SEC

CSC

COT

ASEC Inverse secant, result in radians. ASEC(X) is the inverse secant of the elements of X. Class support for input X: float: double, single

See also sec, asecd. Overloaded methods: codistributed/asec Reference page in Help browser doc asec

ACSC Inverse cosecant, result in radian. ACSC(X) is the inverse cosecant of the elements of X. Class support for input X: float: double, single See also csc, acscd. Overloaded methods: codistributed/acsc Reference page in Help browser doc acsc ACOT Inverse cotangent, result in radian. ACOT(X) is the inverse cotangent of the elements of X. Class support for input X: float: double, single See also cot, acotd. Overloaded methods: codistributed/acot
Reference page in Help browser doc acot

SINH Hyperbolic sine. SINH(X) is the hyperbolic sine of the elements of X.


See also asinh. Overloaded methods: codistributed/sinh Reference page in Help browser doc sinh Hyperbolic cosine. COSH(X) is the hyperbolic cosine of the elements of X. See also acosh. Overloaded methods: codistributed/cosh Reference page in Help browser doc cosh

COSH

ACOSH Inverse hyperbolic cosine. ACOSH(X) is the inverse hyperbolic cosine of the elements of X. See also cosh. Overloaded methods: codistributed/acosh
Reference page in Help browser

doc acosh

ATANH Inverse hyperbolic tangent. ATANH(X) is the inverse hyperbolic tangent of the elements of X.
See also tanh. Overloaded methods: codistributed/atanh Reference page in Help browser doc atanh Exponential. EXP(X) is the exponential of the elements of X, e to the X. For complex Z=X+i*Y, EXP(Z) = EXP(X)*(COS(Y)+i*SIN(Y)). See also expm1, log, log10, expm, expint. Overloaded methods: lti/exp codistributed/exp fints/exp Reference page in Help browser doc exp Natural logarithm. LOG(X) is the natural logarithm of the elements of X. Complex results are produced if X is not positive. See also log1p, log2, log10, exp, logm, reallog. Overloaded methods: gf/log codistributed/log fints/log Reference page in Help browser doc log Common (base 10) logarithm. LOG10(X) is the base 10 logarithm of the elements of X. Complex results are produced if X is not positive. Class support for input X: float: double, single See also log, log2, exp, logm. Overloaded methods: codistributed/log10 fints/log10 Reference page in Help browser doc log10

EXP

LOG

LOG10

LOG2 Base 2 logarithm and dissect floating point number. Y = LOG2(X) is the base 2 logarithm of the elements of X. [F,E] = LOG2(X) for each element of the real array X, returns an array F of real numbers, usually in the range 0.5 <= abs(F) < 1,

and an array E of integers, so that X = F .* 2.^E. Any zeros in X produce F = 0 and E = 0. This corresponds to the ANSI C function frexp() and the IEEE floating point standard function logb(). See also log, log10, pow2, nextpow2, realmax, realmin. Overloaded methods: codistributed/log2 fints/log2 Reference page in Help browser doc log2 Signum function. For each element of X, SIGN(X) returns 1 if the element is greater than zero, 0 if it equals zero and -1 if it is less than zero. For the nonzero elements of complex X, SIGN(X) = X ./ ABS(X). See also abs. Overloaded methods: codistributed/sign Reference page in Help browser doc sign

SIGN

2. Calcular:
>> tan(37) ans =-0.8408 >> sin(37) ans = -0.6435 >> tan(53) ans =-0.4312 >> sec(60) ans = -1.0500 >> cot(30) ans = -0.1561 >> asec(2) ans = 1.0472 >> asin((sqrt(2))/2) ans = 0.7854

>> acsc((2*sqrt(3))/3) ans = 1.0472 >> acos(4/5) ans = 0.6435 >> log(exp^2)

>> log10(100) ans=2

PRACTICA NRO 2 : ARREGLOS, VARIABLES VECTORIALES Y MATRICIALES 2.1 PROBLEMAS. a. quin es mayor, >> exp(pi) ans = 23.1407 >> pi^(exp(1)) ans = 22.4592 ?

Por tanto

>

b. Calcular los valores de las siguientes expresiones >> f1=(1.5)^2+3*0.5+1 f1 = 4.7500 >> f2=sin(pi/6) f2 = 0.5000 >> f3=atan(1) f3 = 0.7854 >> f4=sin(acos((sqrt(3))/2)) f4 = 0.5000 c. Explore el uso de las funciones round, ceil, floor para los valores x=0.3; x=1/3; x=0.5; x=-1.34. >> A=[0.3 1/3 0.5 -1.34]; >> round(A) ans = 0 >> ceil(A) ans = 1 >> floor(A) 1 1 -1 0 1 -1

ans = 0 2.2 Arreglos : a)

0 -2

>> A=[-1 3;4 3;1 0] A= -1 3 4 3 1 0 >> B=[3,-9;6,12;0,15] B= 3 -9 6 12 0 15 >> c=[4,-1,5;2,1,1] c= 4 -1 5 2 1 1 >> D=(2*A-B/3)*c D= 6 12 -6 28 -4 32 -2 -7 5

b)

>> E=[1 -i;1 -i] E= 1.0000 1.0000 >> F=[1 i;1 i] F= 1.0000 1.0000 0 + 1.0000i 0 + 1.0000i 0 - 1.0000i 0 - 1.0000i

>> G=(1+i)*E+(1-i)*F G= 2 2 c) 2 2

>> H=[1 0;1 -1;1 1] H= 1 0 1 -1 1 1

>> I=[0 1 0 1 0;1 0 -1 2 0] I= 0 1 1 0 0 -1 1 2 0 0

>> J=[2 1 0;1 -1 -3;1 4 -1;3 0 2;3 1 0] J= 2 1 0 1 -1 -3 1 4 -1 3 0 2 3 1 0 >> K=[1 0 1 -1;2 1 -2 2;1 0 1 0] K= 1 2 1 0 1 -1 1 -2 2 0 1 0

>> L=(H*I)*(J*K) L= 1 -1 5 -6 -5 2 -13 7 7 -4 23 -19 2.3 Operaciones con arreglos: >> M=[2 3 4;6 (3)^(1/4) 2] M= 2.0000 3.0000 4.0000 6.0000 1.3161 2.0000 >> N=[-20 2 4;5 6 pi] N= -20.0000 2.0000 4.0000 5.0000 6.0000 3.1416 >> P=[18 20 100;sqrt(2) 4 sqrt(8);-6 10 20] P= 18.0000 20.0000 100.0000 1.4142 4.0000 2.8284 -6.0000 10.0000 20.0000 >> Q=[2 -1 10;5 2 4] Q=

2 -1 10 5 2 4 1. Calcular los siguientes arreglos y dibujarlos con ayuda del comando plot >> A=M.*N A= -40.0000 6.0000 16.0000 30.0000 7.8964 6.2832
30

20

10

-10

-20

-30

-40
1600 1400 1200

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1.9

>> B=(M.^2).*(N.^2) B= 1.0e+003 * 1.6000 0.0360 0.2560 0.9000 0.0624 0.0395

1000 800 600 400 200 0

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1.9

>> C=P.^3 C= 1.0e+006 * 0.0058 0.0080 1.0000 0.0000 0.0001 0.0000 -0.0002 0.0010 0.0080

10

x 10

-2

1.2

1.4

1.6

1.8

2.2

2.4

2.6

2.8

1.6

>> D=M./N D= -0.1000 1.5000 1.0000 1.2000 0.2193 0.6366

1.4 1.2 1 0.8 0.6 0.4 0.2 0 -0.2

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1.9

>> E=2^P
1.5 x 10
-11

E= 1.0e+005 * -4.4923 - 0.0000i 1.5788 -6.9831

1 0.5 0 -0.5 -1 -1.5 -2 -2.5 -7

-6

-5

-4

-3

-2

-1

1 x 10

2
5

-0.2785 + 0.0000i 0.3129 0.2484 0.4970 + 0.0000i -1.8804 - 0.0000i -4.6370 - 0.0000i

>> F=((M.*N)./Q)+Q./Q F= -19.0000 -5.0000 2.6000 7.0000 4.9482 2.5708

10

-5

-10

-15

-20

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1.9

>> G=(M).^(N.^Q) G= 1.0e+120 * 2.5822 0.0000 Inf Inf 0.0000 0.0000

x 10 10 8 6 4 2 0 -2 -4 -6

119

1.3

1.35

1.4

1.45

1.5

1.55

1.6

1.65

1.7

1.75

120

>> H=P./P+P H= 19.0000 21.0000 101.0000 2.4142 5.0000 3.8284 -5.0000 11.0000 21.0000

100

80

60

40

20

-20

1.2

1.4

1.6

1.8

2.2

2.4

2.6

2.8

2.4 variables vectoriales: transpuesta () >> s=1:2:6 s= 1 3 5 >> t=linspace(4,6,3) t= 4 5 6 >> A=s.*t A= 4 15 30 >> B=s'*t B= 4 5 6 12 15 18

20 25 30 >> C=s*t' C= 49 >> D=s./t D= 0.2500 0.6000 0.8333

2.5 variables matriciales 1. Comente la extraccin de datos de la matriz >> R=[1 2 3 4 5 6 7 8;9 10 11 12 13 14 15 16;17 18 19 20 21 22 23 24;25 26 27 28 29 30 31 32;33 34 35 36 37 38 39 40;41 42 43 44 45 46 47 48;49 50 51 52 53 54 55 56] R= 1 9 17 25 33 41 49

2 10 18 26 34 42 50

3 4 5 6 11 12 13 19 20 21 27 28 29 35 36 37 43 44 45 51 52 53

7 14 22 30 38 46 54

8 15 23 31 39 47 55

16 24 32 40 48 56

>> A=R(:,:) A= 1 2 3 4 5 6 9 10 11 12 13 17 18 19 20 21 25 26 27 28 29 33 34 35 36 37 41 42 43 44 45 49 50 51 52 53 Indica todos los nmeros >> B=R(:,4) B= 4 12 20 28 36 44 52

7 14 22 30 38 46 54

8 15 23 31 39 47 55

16 24 32 40 48 56

Indica todos los nmeros de la columna 4. >> C=R(7,:) C= 49 50 51 52 53 54 55 56 Indica todos los nmeros de la fila 7.

>> D=R(2:5,:) D= 9 10 11 17 18 19 25 26 27 33 34 35

12 20 28 36

13 21 29 37

14 22 30 38

15 23 31 39

16 24 32 40

Indica los todos los nmeros que comprenden entre la fila 2 y 5. >> E=R(:,4:7) E= 4 5 6 7 12 13 14 15 20 21 22 23 28 29 30 31 36 37 38 39 44 45 46 47 52 53 54 55 Indica todos los nmeros que comprenden entre la columna 4 y 7. >> F=R(1:2:7,3:2:8) F= 3 5 7 19 21 23 35 37 39 51 53 55 Indica los nmeros que comprenden entre la fila 1 y 7 con un paso 2 y los nmeros que comprenden la columna 3 y 8 con un paso 2. >> G=R(1:6,4:8) G= 4 5 6 7 8 12 13 14 15 20 21 22 23 28 29 30 31 36 37 38 39 44 45 46 47

16 24 32 40 48

Indica todos los nmeros que estn entre la fila 1 y 6 y la columna 4 y 8. >> H=R([1 6],[2 8]) H= 2 8 42 48 Indica la interseccin de los nmeros en la fila 1 y 6 con la columna 2 y 8.

2. Construir una matriz z de orden 3x4, la matriz nula e identidad y una del mismo orden acoplado horizontalmente. >> A=[1 2 3 4;5 6 7 8;9 10 11 12] A= 1 2 3 4 5 6 7 8 9 10 11 12 >> zeros(3,4) ans = 0 0 0 0 0 0 0 0 0 0 0 0 >> eye(4,4) ans = 1 0 0 0 1 0 0 0 1 0 0 0

0 0 0 1

3. Calcular el tamao de Z >> size(A) ans = 3 4

PRACTICA NRO 03 3.1 VARIABLE SIMBOLICA, SIMPLIFICACION DE FUNCIONES Y DETERMINANTE EN MATLAB 1. Realizar las siguientes simplificaciones

>> syms a >> F=(1-a^9)/1-a^3; >> simplify(F) ans = - a^9 - a^3 + 1

>> syms a >> F=(1/1+a)+(1/(1+a)^2)+(1/(1+a)^3); >> simplify(F) ans = a + (a + 2)/(a + 1)^3 + 1 2. Calcular la determinante de la matriz >> A=[cos(a*x) sin(a*x);-sin(a*x) cos(a*x)] A= [ cos(a*x), sin(a*x)] [ -sin(a*x), cos(a*x)] >> det(A) ans = cos(a*x)^2 + sin(a*x)^2 3.2 EVALUACION DE OPERACIONES Y EXPRESIONES SIMBOLICAS 1. Evaluar la funcin f(x)=X3 y calcular f(2) y f(b+2)

>> syms x b >> F=x^3; >> subs(F,2) ans = 8 >> subs(F,b+2) ans = (b + 2)^3

2. Considere la funcin f(a,b)=a+b sustituya primeramente a por 4 y b por 5 >> syms a b >> F=a+b; >> subs(F,a,4) ans = b+4 >> subs(F,b,5) ans = a+5 3. Dadas las funciones f(X)=sen(cos( )) y g(X)= ( ). Calcular la compuesta de f y g. tambin calcular la funcin inversa de f y g. >> syms x >> F=sin(cos(sqrt(x))); >> G=sqrt(tan(x^2)); >> compose(F,G) ans = sin(cos(tan(x^2)^(1/4))) >> finverse(F) Warning: finverse(sin(cos(x^(1/2)))) is not unique. ans = acos(asin(x))^2 >> finverse(G) Warning: finverse(tan(x^2)^(1/2)) is not unique. ans = atan(x^2)^(1/2) 4. Sea F y G tal que F=x2+2x+3 y G=x-5. Hallar
-2

>> syms x >> F=x^2+2*x+3;

>> G=x-5; >> T=((subs(compose(G,F),1)+subs(compose(F,G),2)*subs(compose(F,G),3)subs(compose(G,G),2))/subs(compose(F,G),2))^(-2) T= 0.0494

5. Dadas las funciones F=x2+x, G=x3+1 y H=sen(x) +cos(x) Calcular: >> syms x >> F=x^2+x; >> G=x^3+1; >> H=sin(x)+cos(x); >> A=F+G A= x^3 + x^2 + x + 1 >> B=F-G B= - x^3 + x^2 + x - 1 >> C=F/G C= (x^2 + x)/(x^3 + 1) >> D=F-G+H D= x + cos(x) + sin(x) + x^2 - x^3 - 1 >> compose(F,G) ans = (x^3 + 1)^2 + x^3 + 1 >> compose(F,subs(H,pi/3)) ans = 16388444584731286707948041234745/507060240091291760598681282150 4 >> compose(F,compose(G,subs(H,sin(x)))) ans = ((cos(sin(x)) + sin(sin(x)))^3 + 1)^2 + (cos(sin(x)) + sin(sin(x)))^3 + 1
3.3 FUNCIONES DE ANALISIS MATEMATICO EN MATLAB

1. Limites

>> syms n >> s=((n^4+3*n^2+2*n+1)/2*n^4+5*n+4)^(sqrt(n^3-3*n^2-n)); >> limit(s,n,inf) ans = Inf

>> syms n >> s=((2*n+3)*(3*n-5)*(n+1)^2)/n^2*(2*n-3)*(4*n+1); >> limit(s,n,inf) ans = Inf >> syms n >> s=(sqrt(n+sqrt(n+sqrt(n+3))))/sqrt(n+3); >> limit(s,inf) ans = 1 2. Calcular los lmites de las siguientes funciones >> syms x >> s=(x^2+(x-3)^(1/3)-9)/(9-x*sqrt(9*x-3))^(1/3); >> limit(s,x,3) ans = 0

>> syms x >> s=(x*(x+1)^(1/3)+(x+1)^(1/4)-1)/(x^2*(x+1)^(1/3)+(x+1)^(1/4)-1); >> limit(s,x,0) ans =

5
| | | | | |

>> syms x >> s=(abs(x^3-1))/(abs(x-1)+(abs(x-1))^2); >> limit(s,x,1) ans = 3

3.4 CONTINUIDAD 1. Dada la funcin definida como: f=1/(1+ ) si Ilustre este resultado utilizando el comando plot y analize la continuidad en x=0
>> syms x >> f=1/1+exp(1/sqrt(x)); >> limit(f,x,'right') ans = exp(1/right^(1/2)) + 1 >> limit(f,x,'left') ans = exp(1/left^(1/2)) + 1

PRACTICA NRO 04 4.1 ANALISIS MATEMATICO 1. Lmites:

>> syms x >> F=(x^14+x^2-2)/(x^12+4*x^8+x^2-6); >> limit(F,x,-1) ans = 8/23

>> syms x >> F=(x^2+(x-3)^(1/3)-9)/(9-x*sqrt(9*x-3))^(1/3); >> limit(F,x,3) ans = 0 2. Derivadas: Calcular las 5 primeras derivadas de: F=x3-2x2+6 >> syms x >> F=x^3-2*x^2+6; >> W=[diff(F,1),diff(F,2),diff(F,3),diff(F,4),diff(F,5)] W= [ 3*x^2 - 4*x, 6*x - 4, 6, 0, 0] F=1/x >> syms x >> F=1/x; >> W=[diff(F,1),diff(F,2),diff(F,3),diff(F,4),diff(F,5)] W= [ -1/x^2, 2/x^3, -6/x^4, 24/x^5, -120/x^6] F=1/x2-2 >> syms x >> F=1/(x^2-2); >> W=[diff(F,1),diff(F,2),diff(F,3),diff(F,4),diff(F,5)]

W= [ -(2*x)/(x^2 - 2)^2, (8*x^2)/(x^2 - 2)^3 - 2/(x^2 - 2)^2, (24*x)/(x^2 - 2)^3 (48*x^3)/(x^2 - 2)^4, 24/(x^2 - 2)^3 - (288*x^2)/(x^2 - 2)^4 + (384*x^4)/(x^2 2)^5, (3840*x^3)/(x^2 - 2)^5 - (720*x)/(x^2 - 2)^4 - (3840*x^5)/(x^2 - 2)^6] F=sen(x+2) >> syms x >> F=sin(x+2); >> W=[diff(F,1),diff(F,2),diff(F,3),diff(F,4),diff(F,5)] W= [ cos(x + 2), -sin(x + 2), -cos(x + 2), sin(x + 2), cos(x + 2)] Para la siguiente funcin f(x,y)=sen(xy)+cos(xy2) calcular: >> syms x y >> F=sin(x*y)+cos(x*y^2);

>> diff(F,x) ans = y*cos(x*y) - y^2*sin(x*y^2)

>> diff(F,y) ans = x*cos(x*y) - 2*x*y*sin(x*y^2)

>> diff(diff(F,x),x) ans = - y^4*cos(x*y^2) - y^2*sin(x*y)

>> diff(diff(F,y),y) ans = - 2*x*sin(x*y^2) - x^2*sin(x*y) - 4*x^2*y^2*cos(x*y^2)

>> diff(diff(F,x),y) ans = cos(x*y) - 2*y*sin(x*y^2) - x*y*sin(x*y) - 2*x*y^3*cos(x*y^2)

>> diff(diff(F,y),x) ans = cos(x*y) - 2*y*sin(x*y^2) - x*y*sin(x*y) - 2*x*y^3*cos(x*y^2) 3. Integrales: Calcular las siguientes integrales: >> syms x >> F=x^4+sqrt(x); >> int(F,0,5) ans = (10*5^(1/2))/3 + 625

>> syms x y >> F=x^4+cos(x)+sin(y); >> int(int(F,x,0,pi/4),y,-pi,pi) ans = pi*2^(1/2) + pi^6/2560

>> syms z r w >> F=r; >> int(int(int(F,z,0,r),r,0,2*sin(w)),w,0,pi/2) ans = 16/9

4.2 FACTORIZACION, ECUACIONES Y SISTEMA DE ECUACIONES 1. Factorizar las siguientes expresiones algebraicas:

>> syms x y >> F=((x+y)^9)*((x-y)^5)-((x^2)-(y^2))^7; >> factor(F) ans = 4*x*y*(x - y)^5*(x + y)^7

>> syms x >> F=((x+1)^4)+((x+2)^3)+((x+3)^2)-7*(x+2)+2; >> factor(F) ans = (x^2 + 3*x + 6)*(x + 1)^2

>> syms x y >> F=(x^y)*(y^x)+x*y+(x^(y+1))+(y^(x+1)); >> factor(F) ans = (x + y^x)*(y + x^y)

>> syms a b c >> F=((a+b+c)^3)-(a^3)-(b^3)-(c^3); >> factor(F) ans = 3*(b + c)*(a + c)*(a + b) 2. Resolver las siguientes ecuaciones:

>> syms x >> [x]=solve('x^2-64*x=-768','x') x= 16 48

>> syms x >> [x]=solve('(((3-x)^3)+((4+x)^3))/(((3-x)^2)+(4+x)^2=7)','x') x= - 1/2 + (7*3^(1/2)*i)/6 - 1/2 - (7*3^(1/2)*i)/6 - 1/2 + (35^(1/2)*i)/2 - 1/2 - (35^(1/2)*i)/2 >> syms x >> [x]=solve('((72-x)^(1/3))-((16-x)^(1/3)=2)','x') x= 8 3. Resolver el sistema de ecuaciones: >> syms x y >> [x,y]=solve('2*x+5*y=26,3*x-4*y=-7','x,y') x= 3 y= 4 >> syms x y >> >> syms x y z >> [x,y,z]=solve('x*y+x+y=23,x*z+x+z=41,y*z+y+z=27','x,y,z') x= 5 -7 y= 3 -5 z= 6 -8 >> syms x y z t >> [x,y,z,t]=solve('x+y+z=15,x+y+t=16,x+z+t=18,y+z+t=20','x,y,z,t') x= 8 y= 3 z= 5 t =7

4.3 GRAFICO EN CD: 1. Dibujar las siguientes funciones >> x=-1:0.01:5; >> y=sin(x.^3); >> plot(x,y,'r')
1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -1 0 1 2 3 4 5

>> x=0:0.002:10; >> y=sin(x); >> stairs(x,y,'g')

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

90

2 60 1.5

>> x=0:0.001:pi; >> y=1+cos(x); >> polar(x,y,'y')


180

120

150

1 0.5

30

210

330

240 270

300

2. Coloque la siguiente funcin en el dominio que se indica, colocando un ttulo, nombre, a los ejes, colores y leyenda.

PRACTICA NRO 05

5.1 GRAFICOS EN 2D
2

1. >> x=sin(-t)+t; >> y=1-cos(-t); >> plot(x,y)

1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 -8 -6 -4 -2 0 2 4 6 8

x +y =1 1.5

2. ezplot('x^2+y^2=1',[-1.5,1.5])

0.5

-0.5

-1

-1.5 -1.5

-1

-0.5

0 x
x 2-y 2=1

0.5

1.5

3. ezplot('x^2-y^2=1',[-1.5,1.5])

1.5

0.5

-0.5

-1

-1.5 -1.5

-1

-0.5

0 x

0.5

1.5

4. >> ezplot('sin(x)','cos(x)',[1.5,1.5])
y

x = sin(x), y = cos(x) 1.2 1 0.8 0.6 0.4 0.2 0 -0.2 -0.8 -0.6 -0.4 -0.2 0 x 0.2 0.4 0.6 0.8

5. >> ezplot('sin(t)','3*cos(t)',[-1.5,1.5])
2.5

x = sin(t), y = 3 cos(t)

1.5

0.5

-1.5

-1

-0.5

0 x

0.5

1.5

4. Representar sobre su mismo eje las curvas >> x=0:0.001:2*pi; >> y=sin(x); >> z=sin(2*x); >> v=sin(3*x); >> plot(x,y,x,z,x,v) >> legend('sin(x)','sin(2x)','sin(3x)')

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 sin(x) sin(2x) sin(3x)

5. Situar la etiquetas del grafico anterior >> text(x,y,'sin(x)')


sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(2x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(3x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) 0.6 sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) 0.4 sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) 0.2 sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) 0 sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) -0.2 sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) -0.4 sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) -0.6 sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) -0.8 sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) sin(x) -1 0 1 2 3 4 5 6 7 0.8 1

6. Representar en el mismo grafico las funciones sin(x), cos(x); colocados horizontalmente uno al lado del otro con sus nombres y con el eje x tomando valores 0 y 2pi y el eje y tomando valores -1 y 1 >> axis([0 2*pi -1 1]) >> x=0:0.001:2*pi; >> y=sin(x); >> z=cos(x); >> plot(x,y,x,z) >> legend('sin(x)','cos(x)')
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 sin(x) cos(x)

>> axis([0 2*pi -1 1])

7. Representar la figura anterior pero con rejillas


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 sin(x) cos(x)

8. Representar en el mismo grafico las graficas de las funciones sin(X) cos(x) csc(x) y sec(X) colocados en una matriz de 4 graficas. >> t=-2*pi:0.005:2*pi; >> x=sin(t); >> y=cos(t); >> z=csc(t); >> v=sec(t); >> subplot(3,2,1),plot(t,x),title('dibujo 1'); >> subplot(3,2,1),plot(t,y),title('dibujo 2'); >> subplot(3,2,1),plot(t,z),title('dibujo 3'); >> subplot(3,2,1),plot(t,v),title('dibujo 4'); >> t=-2*pi:0.005:2*pi; >> x=sin(t); >> y=cos(t); >> z=csc(t); >> v=sec(t); >> subplot(3,2,1),plot(t,x),title('dibujo 1'); >> subplot(3,2,2),plot(t,y),title('dibujo 2'); >> subplot(3,2,3),plot(t,x),title('dibujo 3'); >> subplot(3,2,6),plot(t,y),title('dibujo 4');

dibujo 1 1 0 -1 -10 1 0 -1 -10 1 0 -1 -10

dibujo 2

-5

0 dibujo 3

10

-5

10

-5

10 dibujo 4 1 0 -1 -10

-5

10

GRAFICOS EN 3D

1. Plot3(x,y,z) >> t=-6:0.2:8;

80

60

40

20

0 10 5 0 -5 -5 -10 0 10 5

>> x=t; y=3-t; z=t.^2; >> plot3(x,y,z) >> grid

2. Surf(x,y,z)

>> [x,y]=meshgrid(-2:0.2:2); >> z=x.*exp(-x^2-y^2); >> surf(x,y,z) >> title('funcion z'); >> xlabel('x'); >> ylabel('y'); >> zlabel('z')

funcion z

3 2 1
z

0 -1 -2 -3 2 1 0 -1 y -2 -2 -1 x 1 0 2

3. Meshz(x,y,z) 4. Sphere
la esfera

>> sphere; >> xlabel('x'); >> ylabel('y'); >> zlabel('z'); >> title('la esfera')

0.5

-0.5

-1 1 0.5 0 -0.5 y -1 -1 -0.5 x 0.5 0 1

5.2 FUNCIONES PARA GENERAR PELICULAS Y MATLAB CON HERRAMIENTA DE DIBUJO 1.

1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

2.

3.

>> dt=pi/20; t=0:dt:2*pi; >> x=cos(t); y=sin(t); >> axis([-1 1 -1 1]), hold on >> plot(x,y) >> hold on >> for k=0.8:-0.05:0.05 plot(k*0.1*x-0.3,k*0.15*y+0.1) plot(k*0.1*x+0.3,k*0.15*y+0.1) end >> s1=(3*(pi/2))-1.1; s2=(3*(pi/2))+1.1; >> s=s1:dt:s2; >> xs=0.5*cos(s); ys=0.5*sin(s); >> plot(xs,ys) >> hold off

1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

5.3 ARCHIVO FUNCTION

Vous aimerez peut-être aussi