Skip to content
ME-705 · MATLAB and R Programming/Important Questions

MATLAB and R Programming (ME-705) - Important Questions

  1. Unit 110 Marks High Priority

    Write an M-file that reads an $n\times n$ matrix, extracts its main diagonal and returns the sum of diagonal elements (handle complex entries).

    Core MATLAB M-file program for matrix input, diagonal extraction and summation; appears frequently in question banks.

  2. Unit 110 Marks High Priority

    In MATLAB, generate a random complex vector $z$ of length 100, compute $\sum z$ and plot $\mathrm{real}(z)$ vs $\mathrm{imag}(z)$. Provide the script and explain steps.

    Combines MATLAB complex number handling, summation and plotting; typical practical programming question.

  3. Unit 28 Marks High Priority

    Using R, create a data frame with numeric and factor columns, show how to append a new row and subset only rows where a factor has a given level.

    Core R data frame manipulation: creation, appending and conditional subsetting; frequently asked in R sections.

  4. Unit 27 Marks High Priority

    Explain differences between MATLAB matrices and R data frames. Provide examples where each structure is preferable (include short code snippets: MATLAB and R).

    Conceptual comparison question that tests understanding of matrix vs data frame semantics and practical use-cases (code examples requested).

  5. Unit 17 Marks High Priority

    Demonstrate plotting in MATLAB: plot a parametric curve with $x=\cos(t)$ and $y=\sin(2t)$ for $t\in[0,2\pi]$, label axes and add a legend.

    Standard MATLAB plotting exercise: parametric plotting, axis labeling and legend usage; common short-answer/programming question.

  6. Unit 26 Marks High Priority

    In R, create a $3\times 3$ matrix, print it, add a new column and extract the submatrix consisting of rows 1 to 2 and columns 2 to 3. Show the R commands and output.

    Practical R matrix operations: creation, printing, adding columns and slicing; core Unit 2 topic with high recurrence.

  7. Unit 27 Marks High Priority

    Write an R snippet to convert a numeric vector into a factor with specified levels, explain how factors differ from continuous variables and show how to reorder factor levels.

    R factors and categorical handling: conversion and level control; tests conceptual and coding skills for categorical data.

  8. Unit 16 Marks High Priority

    Describe the MATLAB environment and basic commands. Give examples of creating variables, listing the workspace, clearing variables, saving workspace, and write a short script that performs matrix multiplication.

    MATLAB environment and basic commands: workspace management and simple matrix operations; foundational practical question.

  9. Unit 17 Marks High Priority

    Write an M-file that reads a character string, converts all lowercase letters to uppercase and returns the ASCII codes of the converted string. Include handling for non-alphabetic characters.

    M-file programming with character/ASCII operations: string manipulation and ASCII code handling, common in M-file programming exercises.

  10. Unit 26 Marks High Priority

    Explain installation and setup steps for R and RStudio. Demonstrate R data types and show examples of arithmetic and logical operators with short code snippets.

    R setup and basic language features: installation, data types and operators; basic but recurrent theoretical/practical question.

Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in