JNTU

JNTU B.Tech IV MATLAB APPLICATIONS Previous Question Paper (December - 2020 - R15)

B.Tech | IV | II | R15 | December - 2020

Answer PaperPaper Code: 128CUMaximum Marks: 75Time: 2 hours

Answer any Five Questions. All Questions Carry Equal Marks.

Main

1

With examples describe the arithmetic operations that can be performed with MATLAB.

15 marks

Answer

MATLAB supports various arithmetic operations that can be performed on scalars, vectors, and matrices. These operations are categorized into array operations (element-by-element) and matrix operations (linear algebraic).

1. Basic Scalar Arithmetic: These operations are performed using standard operators: addition (+), subtraction (-), multiplication (*), division (/), left division (\), and exponentiation (^).

a = 5; b = 3;
result = a + b; % Addition (8)

2. Array (Element-by-Element) Operations: When working with vectors or matrices, adding a period (.) before the operator forces element-wise calculation. This is essential for multiplication, division, and exponentiation.

  • Element-wise Multiplication (.*): Multiplies corresponding elements of two arrays of the same size.
    A = [1 2]; B = [3 4]; C = A .* B; % Result: [3 8]
  • Element-wise Division (./): Divides corresponding elements.
    D = B ./ A; % Result: [3 2]
  • Element-wise Power (.^): Raises each element to the specified power.
    E = A .^ 2; % Result: [1 4]

3. Matrix Operations: These follow the rules of linear algebra. The standard operators (*, /, ^) perform matrix multiplication, matrix division, and matrix exponentiation respectively.

  • Matrix Multiplication (*): The number of columns in the first matrix must equal the number of rows in the second.
    M1 = [1 2; 3 4]; M2 = [5 6; 7 8]; M3 = M1 * M2;
  • Matrix Division (\ and /): Used to solve linear systems of equations. A \ B is equivalent to solving the system Ax = B for x, computed as inv(A)*B.
  • Matrix Power (^): Computes the matrix raised to an integer power (e.g., A^2 is A*A).

4. Transpose Operator: The single quote (') is used to compute the complex conjugate transpose of a matrix, while the dot-transpose (.') performs a simple transpose without conjugation.

2

What are all in built functions for handling arrays in MATLAB? Describe them with example.

15 marks

Answer

MATLAB provides a comprehensive suite of built-in functions for creating, manipulating, and analyzing arrays. These functions are categorized based on their primary utility:

1. Array Creation Functions:

  • zeros(m,n): Creates an m-by-n matrix of zeros. Example: A = zeros(2,3) creates a 2x3 matrix of zeros.
  • ones(m,n): Creates an m-by-n matrix of ones. Example: B = ones(3,2) creates a 3x2 matrix of ones.
  • eye(n): Creates an n-by-n identity matrix. Example: I = eye(3) creates a 3x3 identity matrix.
  • rand(m,n): Creates an m-by-n matrix with uniformly distributed random numbers between 0 and 1.

2. Array Manipulation Functions:

  • reshape(A,m,n): Changes the dimensions of array A to m-by-n without changing the data. Example: B = reshape(A, 2, 4) converts an 8-element vector into a 2x4 matrix.
  • transpose(A) or A': Flips the matrix over its diagonal, swapping rows and columns.
  • fliplr(A) / flipud(A): Flips the array horizontally (left-right) or vertically (up-down).
  • cat(dim, A, B): Concatenates arrays along the specified dimension.

3. Inquiry and Statistical Functions:

  • size(A): Returns a vector containing the number of rows and columns in A.
  • length(A): Returns the length of the largest array dimension.
  • sum(A): Returns the sum of elements in each column.
  • mean(A): Calculates the average value of elements in each column.
  • max(A) / min(A): Returns the maximum or minimum value in each column.

4. Search and Logical Functions:

  • find(A > x): Returns the linear indices of elements in A that satisfy the condition A > x.
  • sort(A): Sorts the elements of each column in ascending order.
3

What is the difference between sub function and nested function? Describe with an example.

15 marks

Answer

Sign in to view the complete answer paper.

4

What is interpolation? How do you perform one dimensional interpolation using MATLAB? Describe with an example.

15 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

How do you perform numerical integration using MATLAB? Describe with an example.

7 marks

Answer

Sign in to view the complete answer paper.

b

Enumerate different solvers in MATLAB describing its purpose in short.

8 marks

Answer

Sign in to view the complete answer paper.

6

Enumerate different steps involved in creating and executing script file in MATLAB.

15 marks

Answer

Sign in to view the complete answer paper.

7

Write a MATLAB Programme to find determinant and rank of given Matrix without using commands.

15 marks

Answer

Sign in to view the complete answer paper.

8

Describe hold on and hold off Commands with examples.

15 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of MATLAB APPLICATIONS from JNTU for B.Tech MECT-MCT-MEM IV II, December - 2020, R15.

For the question paper without answers, switch to the Question Paper tab.

Other papers in MATLAB APPLICATIONS

Loading Question Papers

Fetching data from database...