Programming for Engineers Syllabus 2023
Programming for Engineers Syllabus 2023
( L T P : 1 0 2) : 3 credits
Course Description
This course provides engineers with a foundation in MATLAB, a powerful software platform
for technical computing and visualization. Through interactive lectures, hands-on labs, and
real-world engineering applications, students will gain the skills to:
Course Outcomes
CO1 Recall basics of computer programming
CO2 Understand the usage of functions, loops, conditions, tools in programing
CO3 Understand data structures, visualization, and analysis
CO4 Apply the programming tools and functions to solve engineering and scientific
problems
Course Outline
o Basics of Data Structures (Arrays and Array lists, recursion, searching and
sorting algorithm)
o Creating 2D and 3D plots for various data types.
o Data analysis and statistics with MATLAB tools.
o Importing and exporting data from various formats (electrical signals, acoustic,
string and numerical data)
Assessment (Continuous)
Prerequisites
1. Energy
a. Process modelling and simulation.
i. Subsurface Geosciences | Subsurface Engineering | Dynamic Simulation
| Multi-Physics Modelling | Dynamic Workflows
ii. Modelling cyber-physical systems
b. Process Optimization and Automation
i. Digital Twins | Electrification | Predictive Maintenance
ii. Design a four hydraulic cylinder simulation for automation industry.
c. Data Science
i. Machine Learning | Deep Learning | Reinforcement Learning | Code
Generation
ii. Switch, evaluate, and compare popular deep reinforcement learning
algorithms.
d. Image Science
i. Computer Vision | Image Processing | Signal Processing |
Communications
ii. Train policies interactively with the Reinforcement Learning Designer
app.
iii. Model the training environment in MATLAB and Simulink to reduce
risk of damaging your hardware
e. High-Power Computing
i. Parallel and GPU Computing | Cloud Computing | Quantum Computing
3. Automotive
a. Automated Driving
i. Code generation for object detection by using single shot multibox
detector.
ii. 3D simulation for automated driving
iii. Visualize 3D simulation sensor coverages and detections.
b. Virtual Vehicle
i. Simulink for virtual vehicle development
c. Electric Vehicle
i. Model and simulate batteries and develop BMS.
ii. Model batteries with equivalent circuits and add fidelity with elaborate
circuit topologies.
iii. Simulate non-linearities, thermal effects, SOC/SOH, and degradation of
batteries.
d. Software defined vehicle.
Additional questions
1. Write a program to form multiple batches of students (5 per batch; randomly picked) from
a class of 22 students. DO NOT use more than ‘one’ Matlab function to form these batches.
5. For the same bee # 24, plot instantaneous velocity, tangential and centripetal acceleration
of the same bee using Quivers command of Matlab. Also, perform a regression analysis
between velocity2 and radius of curvature to compute the mean centripetal acceleration of
the bee during its flight.
6. An M-by-M matrix X is given. Using loops, extract values from matrix X to create the
following:
i) matrix A – composed of all values in odd columns AND odd rows of X, e.g.:
ii) matrix B – composed of all entries of X, except for the outside rows and columns, e.g.:
iii) matrix C – composed of diagonals surrounding the middle diagonal of matrix X, e.g.:
The 1st row of C should contain values from the upper diagonal. The 2nd row should contain
values from the lower diagonal.
In other words, this is simply a weighted average of the grades and the credits corresponding
to each course. Calculate each student’s CGPA and store it in a new field called cgpa. For
example, calling StudentGrades(1).cgpa would give the 1st student’s CGPA, calling
StudentGrades(2).cgpa would give the 2nd student’s CGPA, etc.
8. You are given an M-by-N-by-P matrix Y. Using loops and without using loops, scale Y such
that every element in the ith page is scaled by 10i for i =1,2,…,P. For example, given an M-
by-N-by-3 matrix, you would apply the following scaling
You will find the MATLAB functions reshape and repmat useful. Store your result in a matrix
Yscaled.
Hint: To accomplish this task without loops, you need to generate a matrix such that an
element-wise multiplication between this matrix and Y results in the desired scaling.
9. The voltage across a capacitor is measured from t = 0 to 11ms. The voltage measurements
are given in vector V and the corresponding times at which they are taken are given in
vector t. Write code to create a line plot of voltage vs. time with the following requirements:
i) The x-axis must be labeled “time (ms)”.
ii) The y-axis must be labeled “voltage (V)”.
iii) The title must be “Capacitor Voltage”.
iv) The x-axis must only span the time of the measurements, i.e., from 0 to 11ms.
v) The numbers on the axes must have font size 14 and the labels/title must have font
size 18.
10. Plot a histogram depicting the marks obtained in a course by 200 students. And, also
comment the purpose of the plotted histogram and compare it with a normalised histogram.
11. How to perform correlation analysis for more than 2 parameters? For instance, you have
been asked to correlate the cost of a property/flat with 15 different parameters that decides
the cost of that property. Which technique should you use to extract the one parameter that
decides the price of a property?
Hint: You cannot use linear regression as you need to correlate price with 15 different
parameters.
12. A sample text is given below:
13. Without using any Matlab functions, check if the given number is a palindrome or not?
14. Write a program to swap two numbers without using a third variable?
15. Write to program to form an inverted pyramid in Matlab without using any in-built
functions? Also, invert the formed pyramid every 0.5 seconds by 180 deg and display the
pattern.