Skip to content

BEC358B · 2022 · ECE · Semester 3

MATLAB Programming

Back to subjects

Review status & sources

Similar question wording is grouped and ranked by the number of distinct exam sessions. Groups with the same count are ordered by their extracted text. Some subjects have only one session. Paper references show the PDF page and extracted question number when available.

Module 1

Write a MATLAB program which creates a vector t with 10 elements : 1,2,3, .,10 and compute the following quantities. (i) x = t. sin(t) (i) y = !1 t+1 (m1) z = sin(t°)

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • Dec-2023-Jan-2024 · PDF page 38
  • June-July-2024 · PDF page 26

Discuss the various output formats of MATLAB.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 38

Explain briefly about the different screen output formats in MATLAB with suitable examples.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 26
Show 2 Backup Questions

Explain various file types of MATLAB.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 38

List and explain the three basic windows in MATLAB.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 26

Module 2

Discuss briefly about the following functions with example used in MATLAB program : i) zero() ii) ones() iii) eye().

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 26

Explain briefly about the following MATLAB commands with appropriate examples : i) Plot ii) Figure iii) Grid iv) Subplot.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 26

Explain the steps involved in creating script files and executing them in MATLAB.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 38
Show 2 Backup Questions

Explain with an example, how to write and execute a function file.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 38

Write a function factorial to compute the factorial n! for any integer n in MATLAB. The input should be the number n and the output should be n!.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 38

Module 3

Explain the three different kinds of files for reading data into MATLAB's workspace.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
2 exam sessions
  • Dec-2023-Jan-2024 · PDF page 38
  • June-July-2024 · PDF page 27

Create three anonymous functions corresponding to the following expressions : f(x) =x* - 8x + 17x?-4x-20 g(x) =x-4x+4 h(x) =x-4x-5 i) Create anonymous function to evaluate : f(x) - g(x)h(x) at x =3 ii) Create anonymous function to evaluate : f(x) - g(x)h(x) at x = [1 2 3 4 5].

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 27

Explain briefly about the following MATLAB commands; i) pwd ii) dir iii) IS iv) cd v) make dir or mk dir.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 27
Show 2 Backup Questions

Explain briefly, how to define and use anonymous functions in command-line computations.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 38

Solve the following set of simultaneous linear algebraic equations using appropriate MATLAB symbolic computations ; x +3y-z=2 x-y+z=3 3x -5y=4.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 27

Module 4

7 Demonstrate briefly about reshaping matrices using MATLAB commands with suitable examples. Compute the following MATLAB commands : fix([-2.33 2.66]) i1) floor([-2.33 iIi) ceil([-2.33 2.66]) iv) round([-2.33 v) mod(26, 5) vi) sign([-2.33 2.661).

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 27

Apply the six relational operators in MATLAB to the operands x =11 5 3 7] and y =10 2 8 7]. Comment on the results obtained.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 27

Briefly explain two cases, where initialization of a matrix is always advisable.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 39
Show 2 Backup Questions

Identity the output of the following commands. i) eye (3) ii) B = [ones(3) zeros(3,2) ; zeros(2, 3) 4*eye(2) ] IIi) diag (B)' іv) d= [2 4 6 8] d1= -3-3-3] d2 = [-1 -1] D = diag(d) + diag(d1, 1) + diag(d2,-2)

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 39

What are command - line functions? Explain with examples.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 27

Module 5

0.9 Brietly explain the loop statements used in MATLAB with examples. Let us consider the following system of linear equations: 2r 6 2r 2 r-1 3г

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 39

Briefly explain the following commands of MATLAB: (1) ₴ Error Input

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • Dec-2023-Jan-2024 · PDF page 39

Explain briefly about script file and function file with suitable examples. > OR

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 27
Show 2 Backup Questions

Illustrate the Recursion function is MATLAB with appropriate examples.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 27

Write a MATLAB function file to solve the set of linear system equations using the Cramer's method : x+y+z=1 2x - 6y-z=0 3x+4y+2z=0.

OCR transcription · Wording, symbols, or figures may be incomplete.

View question scan & diagramsOriginal question scan, part 1
1 exam session
  • June-July-2024 · PDF page 27