Lab Work 5
Lab Work 5
2023472606
LAB WORK 5
TITLE
LAB WORK 5
By
Total / 10
Page | 1
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
Solution contents ● Miss important parts and are incomplete ● 100% complete with details
including data ● Inaccurate and full of mistakes/errors ● Accurate and no mistakes/errors
analysis, results, ● Insufficient data/evidences provided ● Sufficient data/evidences provided
graphs, tables,
diagrams, and
computer codes,
etc.
Discussion, ● Not thorough and undiscerning ● Very thorough and discerning
conclusion, ● No correlation with objectives ● Highly correlated to objectives
recommendation, ● No corresponding citation ● Many corresponding citations (5 or more)
references, etc.
Page | 2
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
Table of Contents
1.0 Introduction ................................................................................................................................ 4
2.0 Theoretical background .............................................................................................................. 5
2.1 Literature review ..................................................................................................................... 5
2.2 Fundamental principles........................................................................................................... 5
2.3 Assumptions ............................................................................................................................ 6
3.0 Methodology ............................................................................................................................... 7
4.0 Results ......................................................................................................................................... 8
5.0 Discussion of result. .................................................................................................................. 12
6.0 Conclusion ................................................................................................................................. 13
7.0 Appendices ................................................................................................................................ 14
Page | 3
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
1.0 Introduction
In this introduction to MATLAB, we will look at its key features, syntax, and
applications, laying the groundwork for users to use it to solve a variety of
computational problems and conduct sophisticated data analyses. MATLAB provides
a versatile environment for tackling a wide range of challenges in the realms of
mathematics and data science, whether you are an engineer, scientist, researcher, or
student.
Page | 4
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
The robust data visualisation capabilities of MATLAB, which support both 2D and
3D plotting, aid in the analysis and interpretation of results. Simulink, a graphical
programming environment, is now included, extending its utility for modelling,
simulating, and analysing multidomain dynamical systems. Interfacing with other
languages, symbolic computing, support for parallel and GPU computing, and
application deployment tools are also strengths. MATLAB is a popular choice among
researchers, engineers, and scientists from a variety of disciplines due to its
versatility and comprehensive features.
Page | 5
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
symbolic maths and use multiple processors to perform faster calculations. You can
easily deploy your applications. Because of these principles, MATLAB is popular in
science and engineering.
2.3 Assumptions
I. Numeric Precision:
MATLAB uses finite precision arithmetic, leading to potential round-off errors,
especially in long or repetitive calculations. Users must exercise caution
regarding numerical precision to ensure accurate results in their
computations.
II. License and Cost:
MATLAB is a commercial software, and users need to be mindful of licensing
agreements and associated costs. Understanding the financial implications,
especially for additional toolboxes, is crucial for individuals and organizations
utilizing MATLAB.
III. Toolbox Compatibility:
MATLAB's core functionality is extended through various toolboxes. Users
must ensure that the required toolboxes are available to access specific
functionalities. The availability of appropriate toolboxes directly impacts the
range of applications and advanced features that can be utilized within
MATLAB.
IV. Hardware Compatibility:
Users should check the compatibility of MATLAB with their hardware
configurations. Particularly important for advanced features like parallel
computing or GPU acceleration, ensuring compatibility with specific hardware
is crucial to optimize performance and utilize certain functionalities effectively.
V. Data Representation:
MATLAB represents data in various formats, and users need to be mindful of
precision and format when importing or exporting data. Mismatches in data
types can lead to unexpected errors or inaccurate results, underscoring the
importance of careful data handling.
VI. Learning Curve:
While MATLAB is designed to be user-friendly, there is a learning curve,
especially for those new to programming or mathematical modelling. Investing
time in understanding MATLAB's syntax and capabilities is crucial for users to
maximize their proficiency and efficiency with the software.
Page | 6
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
3.0 Methodology
The acronym MATLAB stands for "Matrix Laboratory," and it provides a versatile
and dynamic environment for numerical computing, data analysis, and visualisation.
To harness MATLAB's computational power, a series of well-defined steps must be
followed. Set up the MATLAB environment, install the software, and launch either the
command-line interface or the graphical user interface (GUI). MATLAB's interactive
nature is evident in its command window, where users can perform quick calculations
and interactively explore data. MATLAB supports both scripting and function-based
approaches, allowing users to write automation scripts as well as custom functions
for modularity. MATLAB simplifies numerical computing tasks by providing extensive
support for variables, indexing, and specialised toolboxes. It is especially adept at
handling complex mathematical operations and algorithms.
The robust data manipulation capabilities of MATLAB allow users to store data in
various formats and manipulate it efficiently. The platform excels at data visualisation,
with a robust set of plotting functions for creating informative 2D and 3D visual
representations. Users can easily customise plots by adjusting properties to meet
specific needs. The language also includes programming constructs such as control
flow mechanisms and error handling to ensure code implementation flexibility and
robustness. Debugging and profiling tools improve the development process by
detecting and correcting errors as well as optimising performance.
Beyond coding, the MATLAB methodology includes features for publishing and
sharing results. By publishing MATLAB code and results in multiple formats, users
can create reports, presentations, or documentation, facilitating collaboration and
knowledge sharing. As users gain proficiency, they can explore additional features
and techniques, allowing them to realise MATLAB's full potential for diverse
applications in engineering, science, and beyond.
Page | 7
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
4.0 Results
A. Repeat and perform the following operations (the symbol ↵ means ‘press
enter’):
A. >> 𝐴 = 2; ↵
B. >> 𝐵 = 3; 𝐶 = 4; ↵
C. >> 𝐷 = 𝐴 + 𝐵 ↵
D. >> 𝐸 = 𝐴^3 + 𝐵^𝐴 ↵
E. >> 𝐹 = 2 ∗ 𝐶 + 𝑠𝑞𝑟𝑡(𝐶) – 1 ↵
F. >> 𝑠𝑞𝑟𝑡(𝐹) , 𝑠𝑞𝑟𝑡(– 𝐹) ↵
G. >> 𝑐𝑙𝑒𝑎𝑟 𝑎𝑙𝑙 ↵
Page | 8
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
Page | 9
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
Using the inverse matrix method i.e. y = A– 1 x where the determinant of A is not
zero, solve the following system of linear algebraic equations:
5𝑋1 + 2𝑋2 + 𝑋3 = 3
4𝑋1 + 𝑋2 − 𝑋3 = −3
−2𝑋1 + 3𝑋2 − 3𝑋3 = 5
Page | 10
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
Page | 11
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
In this work, I have been assigned to complete an assignment related to how MATLAB works
where I need to find a way to use MATLAB based on the questions that have been given.
there are 4 questions that have been assigned to be completed, which are tasks a b c and d.
In this question a, the answer must be made according to the instructions of the question
and made according to the correct symbols and commands. In question b, I need to make a
few calculation methods to get the product of the product of the addition of the product of
division and also the product of powers for each matrix created. in this question I was able to
learn many things starting from the correct use of symbols and commands and also how to
apply the correct command according to the requirements of the question. In question c, the
beginning of the use of new commands and there are also equations that need to be made
according to the command matrix method.0n the other hand, I have obtained a form of graph
according to the requirements of the question.
Page | 12
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
6.0 Conclusion
Page | 13
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
7.0 Appendices
I. MATLAB assumptions
https://www.mathworks.com/help/symbolic/sym.assume.html
II. Introduction of MATLAB
https://www.simplilearn.com/tutorials/matlab-tutorial/what-is-matlab-introduction-
for-beginners
III. How to define matrix in MATLAB
https://www.tutorialspoint.com/matlab/matlab_matrics.htm
IV. Methodology and implementation
https://www.mathworks.com/academia/books/gmdh-methodology-and-
implementation-in-matlab-onwubolu.html
V. Literature review of MATLAB
https://www.mathworks.com/academia/books/gmdh-methodology-and-
implementation-in-matlab-onwubolu.html
Page | 14
MUHAMMAD SUHAIMI BIN SAJAHAN
2023472606
LAB WORK 5
Page | 15