matlab no1

of 15/15
Grading Criteria March July 2012 CECOS College of Engineering and IT Signals and Systems Lab Course Attendance……….10% Lab Tasks…………..30% Project………………20% Lab exam..………...20% Viva…………………..20%
  • date post

    07-Jul-2015
  • Category

    Education

  • view

    78
  • download

    4

Embed Size (px)

Transcript of matlab no1

  • 1. Signals and Systems Lab CourseGrading Criteria Attendance.10% Lab Tasks..30% Project20% Lab exam.....20%Viva..20%CECOS College of Engineering and ITMarch July 2012

2. Accessing lab server To download manuals and software from lab server Goto : start >> Run >> write dsp-serverCECOS College of Engineering and ITMarch July 2012 3. Lab No.01Getting Familiar with MATLABDesigned by : Dawar Awan [email protected] CECOS College of Engineering and ITMarch July 2012 4. MATLAB Software by MathWorks Matrix Laboratory Every thing is treated as matrix Integrates computation, visualization, and programming in an easy-to-use environment A high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numeric computation CECOS College of Engineering and ITMarch July 2012 5. MATLAB add-on toolboxes provide application specific commands The power lye in rich libraries and toolboxes for almost every field of engineeringCECOS College of Engineering and ITMarch July 2012 6. Starting/Ending MATLAB Double click MATLAB icon to launch MATLAB A command window will appear with the prompt >> you are now in MATLAB To quit from MATLAB write exit or quit on MATLAB prompt and press enterCECOS College of Engineering and ITMarch July 2012 7. MATLAB InterfaceCurrent directoryCommand window WorkspaceCommand historyCECOS College of Engineering and ITMarch July 2012 8. Variables User defined variables CECOS College of Engineering and IT(^ , is used for power)March July 2012 9. Variables Suppressing output(use semi colon at the end of instruction) Value of variableCECOS College of Engineering and ITMarch July 2012 10. Variables Knowing your active variables >> who Your variables are: ans x y To remove a variable, write clear variablename>> clear x To remove all the variables from workspace, use clear >> clearCECOS College of Engineering and ITMarch July 2012 11. Variable arithmetic2+3*4^2 2 + 3*16 2 + 48 50CECOS College of Engineering and ITMarch July 2012 12. Predefined trigonometric functions Function Meaning Example =========================================================== sin sine sin(pi) = 0.0 cos cosine cos(pi) = -1.0 tan tangent tan(pi/4) = 1.0 asin arcsine asin(1)= 1.5708 acos arccosine acos(1)= 0.0 atan arctangent atan(1)= 0.7854 exp exponential exp(1.0) = 2.7183 log natural logarithm log(2.7183) = 1.0 log10 logarithm base 10 log10(100.0) = 2.0 =========================================================== The arguments of trigonometric functions are given in radiansCECOS College of Engineering and ITMarch July 2012 13. Practice Verify that sin2(x)+ cos2(x) = 1 For arbitrary x, the MATLAB code will be:CECOS College of Engineering and ITMarch July 2012 14. MATLAB Help www.mathworks.com >> help >> help CECOS College of Engineering and ITMarch July 2012 15. Tasks 1. Write a MATLAB code to verify the formula a2-b2 = (a+b)(a-b)2. What is the function of the commands, ceil and floor ? Use MATLAB help to learn these commands and then apply them to a constant of 4.5 3. Use MATLAB to find the area of a circle whose radius is 4CECOS College of Engineering and ITMarch July 2012