Basics of MATLAB

Hello people! Welcome to an exciting series on The Engineering Projects in which we are studying MATLAB. This series is not just organized just for technical people but for anyone with a basic knowledge of programming and mathematics. We will define each and every concept from scratch and you are not going to bore in any lesson because you will learn new and exciting things in every lecture. If you are wondering what MATLAB can do and what some of its features make it the best calculator and it performs complex calculations in just seconds. You will also see some other parts of MATLAB that make it the best. Have a look at the list of the topics that we are going to discuss with you:

  1. What is MATLAB?

  2. What are some basic features of MATLAB?

  3. If I need to have some prerequisites in MATLAB?

  4. What is an example of a simple task in this software?

  5. How different disciplines of mathematics are getting benefits with MATLAB?

 First of all, let us see the introduction of MATLAB and after that, we will move towards some different concepts. 

Introduction to the MATLAB

MATLAB is a programming language specially designed for engineers and mathematicians and the company that leads the production, maintenance, and other operations of this software. It is interesting to note that MATLAB takes its name because it is a matrix laboratory and is called so by using the combination of both words. It has different parts such as Simulink which is the graphical window helping electrical and electronic engineers to solve different types of circuits in an efficient way without the need for real components. So, we can say that:

“MATLAB is a specialized programming language introduced by MathWorks for the students of engineering and mathematics and has the multi-windows for different types of operations.”

As we said, this software is a specialized laboratory of matrices and we see a hundred different operations that are specialized for the matrices but are also implemented on different related concepts. The LINPACK and EISPACK did the initial development of this language but we see that MathWorks has the main authority and is working more and more in this field.

The best thing about MATLAB is its multi-paradigm nature that attracts every type of users.

such as functional users, Object-oriented programming experts, and others. Here is the image that describes the multi-paradigm nature of MATLAB.

In this way, you can conclude that MATLAB is used in two ways:

  • Environment

  • Programming Language

But in general, we will use the word  “software” throughout this course for the sake of simplicity because most of the students are unaware of different technical terms. 

You must know, the operations in the MATLAB are stored in the form of matrices no matter if you are using the string, character type, or variable type, these are stored in the form of matrices in MATLAB and in this way, by using properties of matrices, MATLAB performs almost all types of operations by using these matrices.

Understanding the MATLAB System

To understand the importance and usage of MATLAB, we are discussing a brief description of the system inside MATLAB you are going to enjoy it because it has some extraordinary features that make your boring practical work easy and fluent. For the sake of simplicity and a clear concept, we can divide the MATLAB system into five parts which are shown in the image given below:

If you are not familiar with every part, do not worry because I am going to express it in very simple words. There is no need to memorize each of them, you just have to simply put these words into your mind and decide which type of feature you are going to use most of the time when you will discoverMATLAB in detail. 

Development Environment

The first thing that must be kept in mind is the basic introduction to MATLAB. It is a development environment that helps programmers to get the desired result in a better way. It has a unique set of environment that enables the users to operate MATLAB functions and files that is usually pre-installed in MATLAB. It has the following features:

  • A desktop 

  • Command window

  • A command history

  • An editor

  • A debugger

  • Different browsers

When you start MATLAB, you will be fetched by all of these without searching much. Some of these are just a click away from the main window and you can use them simultaneously. 

Mathematical Function Library

This is a magical library for every type of engineer and for pure mathematicians. The pre-defined functions are there for you through which you can use trigonometric functions such as sin, cosine, Bessel function, fast Fourier transform, and other functions that help the users get rid of long derivation and calculations. Instead, they simply use the function library and pre-defined functions in an easy way. The main purpose of these libraries is to ignore the long calculations and focus on the working and results of these functions. Usually, people learn the long derivations in the theoretical part and get practice about the same topic in MATLAB  by ignoring the long calculations all the time when they solve the problems. 

MATLAB Programming Language

MATLAB is a great programming language that gives users to use it for a great number of tasks. No matter if you have a simple and easy task to perform through the program or if you have a complex program to perform on MATLAB. All the programs are easy to perform and if a person has an understanding of this superb language, you can easily make complex programs in an easy way because MATLAB knows best what you want. 

This language was developed by the owners of MATLAB and it is closely related to the language that we use in our daily life. In this way, we get a more user-friendly language that is easily understandable by non-technical people as well if they pay to heed the basic concepts. 

User-Friendly Graphical Experience

When I started to learn MATLAB, I wanted to perform the signals in this fantastic development environment and I was amazed to see the versatility of the programming languaging and the options and facilities it provides to highlight the results in the best way. 

For the best data visualization of data, MATLAB has a three-dimensional and two-dimensional high-level structure that provides the best and most impressive representation of data in the best manner. 

API or External Interface of MATLAB

MATLAB is not just limited to the specific language but it gives you the independence to use multi-languages on ti such as FORTRAN and C. If you are not familiar with these two, do not worry because MATLAB is not just limited to these two but you can do many useful tasks with this versatile software. 

Pre-requisites to Getting Start With MATLAB 

As we are discussing from the beginning, this environment is for technical people such as engineers, and therefore, we assume that if you are starting to learn this fantastic software you must have the following concepts in your mind:

  • Little knowledge of programming. At least you must know what is programming and why we are doing this. 

  • What is a statement?

  • How can you declare the variables and constants and what is the purpose to do so? 

  • Plotting of graphs and other visual pieces of information like this.

Do not worry if you do not have all these concepts or if you are new to the programming procedures because we are going to discuss all the things in an easy and brief way so that the new users understand all the concepts and the technical people may revise their concepts. Sometimes, you do not have to have all of these concepts in mind when you have the task of simple or basic level but I think it becomes fun when you start using MATLAB and after that, you try to have more and more practice to get the amazing results on this user-friendly software.

Example of MATLAB Commands

Are you excited about using MATLAB? If yes then let’s talk about a simple and easy command on MATLAB to show you a glance at the working and the screen of MATLAB. I am not going to explain each and every part of this command because you will learn a lot about it in the upcoming lectures. For this, if you have the basic concept of matrices, you will get an idea of what is going on on the screen MATLAB. So, let’s have a look at the simple addition of two matrices.

In the simplest command that we have used above, we have simply declared two matrices with the names A and B. It is important to store the values of matrices in the variables to use them later. You are going to use these values for the addition with the help of easy command. You must know, you can use any name of the variable instead of A and B but usually, we utilize these variables because they are simple to understand.

Role of MATLAB in Engineering

There is no need to explain why MATLAB is important in the engineering field because it is specialized for engineers and all the features of this marvelous software are designed with keeping engineers in mind especially when we talk about electrical and electronic engineers. Usually, MATLAB is easy to use for technical people because, during their educational period, they use different types of software and languages and know how to deal with such environments for the sake of complex tasks and calculations in engineering.

Many students of engineers are providing the best ideas about their fresh ideas in engineering concepts through MATLAB without spending a large amount on experimentation, they can easily propose their ideas with the help of simulations in MATLAB.

Usually, the instruments have errors in the calculation and do not provide 100 % accurate results but when we perform the simulation with software such as MATLAB, we get the ideal results all the time without any issues with accuracy.

MATLAB in the Field of Economics

When talking about the applications of MATLAB in the field other than engineering, you will find economics one of the most important because of its built-in capabilities to work with time series data, computation techniques, presentation of the result with the help of visualizations, and some other features that are up to mark and makes the study and teaching of economic’s in a better way.

The graphical representation of results in different ways makes this environment more user-friendly to even those who are less aware of the technical stuff and software. So, it becomes easy to understand the concepts with the help of this amazing environment.

Statistic With the Help of MATLAB

When we are dealing with statistics, we can use MATLAB for different types of tasks such as descriptive or inferential and people related to this field find it useful to use MATLAB instead of using the typical manual methods or other software because these all are time taking and have some limitations.

Trus, MATLAB is a powerful programming language that is used in the programming environment developed by different companies and maintained by Mathworks for engineers. But, other disciplines such as economics and statistics also have applications in MATLAB because all of them are related to mathematics. MATLAB is developed with the help of concepts of matrices and therefore, it also involves the user-friendly functions and commands of matrices that are extremely useful in a great number of departments. It was the introductory lecture on MATLAB and you will learn more about it in the next session where you will be directed to install MATLAB in the best way with all the required information. This course is equally useful for the beginners and the persons with intermediate concepts about the programming language because the revision and tips will be there for you at every steps and you are not going to bore throughout this series.

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir