0% found this document useful (0 votes)
5 views

lab_1dip[1]

The lab report details various MATLAB commands used to perform mathematical operations, including calculating factorials, trigonometric functions, and basic arithmetic. It emphasizes the importance of distinguishing between degrees and radians in trigonometric calculations and showcases MATLAB's capabilities in numerical computation. The exercise reinforced the understanding of MATLAB as a valuable tool for mathematical analysis.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

lab_1dip[1]

The lab report details various MATLAB commands used to perform mathematical operations, including calculating factorials, trigonometric functions, and basic arithmetic. It emphasizes the importance of distinguishing between degrees and radians in trigonometric calculations and showcases MATLAB's capabilities in numerical computation. The exercise reinforced the understanding of MATLAB as a valuable tool for mathematical analysis.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Course: CS-406 Digital Image Processing

Lab Report 01

Submitted By:

Muhammad Jahangir (21-CS-089)

Basit Ali (21-CS-104)

Muhammad Alrayan (21-CS-107)

Section B

Submitted To:
Ms. Syeda Aimal Fatima
Department of Computer Science HITEC University Taxila
Write MATLAB command/commands to compute the factorial of 7, 6 using fact().

Write MATLAB command/commands to compute the cosine and sine of the angle 45
where 45 is in degrees.

Write MATLAB command/commands to compute the tangent of the angle 45 where 45 is


in radians.

Write MATLAB command/commands to perform the operation 3*4+6.

Write MATLAB command/commands to perform the operation cos(5) . The value of 5 is


in radians.
Write MATLAB command/commands to perform the operation 2*x*x+10*x*6 for x = 4 .

Write MATLAB command/commands to assign the values of 3 and 4 to the variables x


and y, respectively, then calculate the value of z where z = 2x − 7y.

njkajk

Explanation
In this lab exercise, we utilized MATLAB to perform a variety of mathematical operations,
demonstrating its capabilities in numerical computation. The tasks included calculating factorials,
evaluating trigonometric functions, and executing basic arithmetic operations.
1. Factorials: We computed the factorial of integers using the factorial() function, which is
fundamental in combinatorial mathematics and probability theory.
2. Trigonometric Functions: We distinguished between degrees and radians when
calculating trigonometric values. The cosd() and sind() functions were used for angles in
degrees, while cos() and tan() were employed for angles in radians. This distinction is
essential, as the input format directly influences the output.
3. Arithmetic Operations: We performed basic arithmetic calculations, showcasing
MATLAB's efficiency in handling straightforward mathematical expressions.
4. Variable Assignment and Expressions: We assigned values to variables and evaluated
algebraic expressions, illustrating MATLAB's proficiency in symbolic computation and
variable manipulation.

Conclusion
This lab demonstrated the versatility and power of MATLAB for performing a wide range of
mathematical operations. By computing factorials, evaluating trigonometric functions, and
executing arithmetic calculations, we gained practical experience in using MATLAB for numerical
analysis. The ability to differentiate between degrees and radians in trigonometric calculations is
particularly important in ensuring accurate results. Overall, this exercise reinforced our
understanding of MATLAB as a valuable tool for mathematical computation and analysis.

You might also like