Skip to content
VUBuddy

MTH643 Midterm Past Papers

Introduction to MATLAB PDF 499 KBUpdated 23 Oct 2026
Midterm past paper MTH643 Midterm Past Papers PDF 499 KB
vubuddy.com
Type
Midterm past paper
Course
MTH643 Introduction to MATLAB
Size
PDF 499 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 499 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 4. Download the file for all 4 pages.

MTH643 · Mid Term Papers · Paper 1

Q1. i.

Define x and initialize it with a value 15

ii.

Take the square root of x and store the answer in variable y

iii.

Write a code for expression w=x

sin( )

y

Solution:

>> clc >> clear all >> close all >> syms x >> x=15 >> y=sqrt(x) >> w=x^y*sin(pi)

Q2. Write the following in matlab

Z= x y

x y

then solve the expression to find the value of Z by

substituting the value of x=6, y=7

Solution:

>> clc >> clear all >> close all >> syms x y >> z=(x+y)^6/(x^2*y); >> subs(z,{x,y},{6,7})

Q3. Plot the contour F(x,y)=sin(x)+cos(y) over the interval of 5

5 and -5 · x · x

Solution: >> clc >> clear all >> close all

>> contour(x,y,sin(x)+cos(y))

Q4. Base and height given find the Area?

Solution:

As we know formula of Area of rectangle is A= b×h

>> clc >> clear all >> close all >> b=4 >> h=7 >> A=1/2*b*h; >> disp(A)

Paper 2

Q1. Find the value of the following expression

i.

3 at x=5 U x y x x y y

ii.

f(x) = sin*x at x=pi/2

Solution:

I. >> clc >> clear all >> close all >> syms x y >> u=2*x+x*y^2+3*y; >> subs(u,x,5)

II. >> clc >> clear all >> close all >> syms x >> f=sin(x); >> subs(f,x,sym('pi/2'))

Q2. Find the solution of the following system of linear equations in matlab (value of x, y and z should be

displayed) · x · y · z · x · y · z · x · y · z

Solution: clc clear all close all

[x,y,z]=solve('x+y+z==2','-x+y-z==3','x+2*y+3*z==-10')

Q3. Plot the curve of the following in one graph

f x x x x x

2 on domain [-10,10] g x x x x

Solution:

>> clc >> clear all >> close all >> syms x >> f=2*x^4+3*x^3+5*x^2+2*x-3 >> g=5*x^4+2*x^2+2*x-2 >> ezplot('f',[-10,10]) >> hold on >> ezplot('g',[-10,10]) >> hold off

Q4. Take input from user

I.

What is your name?

II.

What is your age?

Then display your name and your age is

Solution: >> clc >> clear all >> close all >> name=input('enter the name: ','s') >> age=input('enter the age: ') >> if age>20 >> disp('my age is 25') >> else age<20 >> disp('my age is not 25') >> end

Paper 3

Q1. Plot the curve of the following function

x y xy

Solution: >> clc

All MTH643 files →
MTH643 Introduction to MATLAB All MTH643 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.