JNTU

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

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

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

Answer any Five Questions. All Questions Carry Equal Marks.

Main

115 marks
a

What are the rules to be followed while naming variables in MATLAB programming?

7 marks

Answer

Variable names in MATLAB must follow these specific rules:

  • The name must begin with a letter.
  • The name can contain letters, digits, and underscores.
  • MATLAB is case-sensitive, meaning 'Variable', 'variable', and 'VARIABLE' are treated as distinct entities.
  • The name must not exceed the maximum length defined by the namelengthmax function (typically 63 characters).
  • Variable names cannot be MATLAB keywords (e.g., if, for, while, end).
  • Special characters like spaces, punctuation, or mathematical operators are not permitted.
b

What are script files? What is the advantage of using script files than typing the commands in command window?

8 marks

Answer

A script file is a text file containing a sequence of MATLAB commands and statements. It has a .m extension and executes the commands in the order they are written, just as if they were typed directly into the Command Window.

The advantages of using script files over the Command Window include:

  • Reusability: Scripts can be saved and executed multiple times without retyping the code.
  • Modifiability: Code can be easily edited, corrected, and updated in the Editor/Debugger window.
  • Complexity Management: Scripts allow for the organization of long, complex sequences of operations into logical blocks, which is not feasible in the transient Command Window.
  • Documentation: Scripts can include comments to explain the logic, making the code easier to understand and share.
  • Debugging: Script files support the use of breakpoints and step-by-step execution, which are essential for troubleshooting complex algorithms.
2

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

15 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Plot the function

y = 3x3 – 26x + 10
, and its first and second derivatives, for
–2 ≤ x ≤ 4
, all in the same plot.

10 marks

Answer

Sign in to view the complete answer paper.

b

What is the use of legend command in MATLAB?

5 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

List any three methods used by MATLAB for interpolation.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write the MATLAB code for dividing the polynomial

12x6 + 21x5 – 11x4 – 14x3 + 18x2 + 28x – 4
by the polynomial
4x2 + 7x – 1
.

10 marks

Answer

Sign in to view the complete answer paper.

5

Discuss the use of mesh and surf commands in MATLAB. Also explain the difference between these two.

15 marks

Answer

Sign in to view the complete answer paper.

6

Solve the following equation by writing a MATLAB program.

15 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Create a row vector that has the elements: 6, 8.3, 81,

e2.5
, sin(π/3), and 23.05.

9 marks

Answer

Sign in to view the complete answer paper.

b

Using the zeros, ones, and eye commands create the following array:

6 marks

Answer

Sign in to view the complete answer paper.

8

What are nested functions? How to create nested functions in MATLAB? Explain.

15 marks

Answer

Sign in to view the complete answer paper.

About this paper

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

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in MATLAB APPLICATIONS

Loading Question Papers

Fetching data from database...