(MATLAB MCQs Aeronautical Engineering

What does MATLAB stand for? a) Matrix Laboratory b) Mathematical Laboratory c) Matrix Language d) Mathematical Language Answer: a) Matrix Laboratory Which MATLAB function is used to create a 2D plot? a) plot2() b) scatter() c) plot() d) graph() Answer: c) plot() How can you create a matrix in MATLAB? a) Using matrix() b) Using array() c) Using square brackets [] d) Using createMatrix() Answer: c) Using square brackets [] Which command is used to calculate the determinant of a matrix in MATLAB? a) determinant() b) det() c) matrixdet() d) finddet() Answer: b) det() What is the purpose of the subplot() function in MATLAB? a) To create multiple figures b) To plot multiple graphs in a single figure c) To sub-divide a matrix d) To save a figure Answer: b) To plot multiple graphs in a single figure Which function is used to solve a system of linear equations in MATLAB? a) solve() b) linsolve() c) inv() d) mldivide Answer: d) mldivide How do you access the element in the 2nd row and 3rd column of a matrix A? a) A(2, 3) b) A(3, 2) c) A[2, 3] d) A{2, 3} Answer: a) A(2, 3) Which MATLAB function would you use to compute the eigenvalues of a matrix? a) eig() b) eigen() c) values() d) eigenvalues() Answer: a) eig() What is the result of the MATLAB expression 2^3? a) 6 b) 8 c) 9 d) 16 Answer: b) 8 How can you generate a row vector of 10 evenly spaced values between 1 and 5 in MATLAB? a) linspace(1, 5, 10) b) range(1, 5, 10) c) space(1, 5, 10) d) evenly(1, 5, 10) Answer: a) linspace(1, 5, 10) Which MATLAB command is used to create a 3D surface plot? a) surf() b) mesh() c) contour() d) plot3() Answer: a) surf() How can you generate random numbers between 0 and 1 in MATLAB? a) rand() b) random() c) randn() d) randi() Answer: a) rand() What is the function of the for loop in MATLAB? a) To perform operations in parallel b) To iterate over a sequence of values c) To create conditional statements d) To handle exceptions Answer: b) To iterate over a sequence of values Which function would you use to create a matrix of ones in MATLAB? a) ones() b) matrix() c) createones() d) makeones() Answer: a) ones() What is the purpose of the meshgrid() function in MATLAB? a) To create a grid of 3D data points b) To generate 2D coordinate matrices c) To perform mesh analysis d) To plot 3D surfaces Answer: b) To generate 2D coordinate matrices How do you comment a single line in MATLAB code? a) /* comment */ b) # comment c) % comment d) // comment Answer: c) % comment Which function is used to plot data points in 3D space in MATLAB? a) plot3() b) scatter3() c) plot() d) mesh() Answer: a) plot3() How can you find the size of a matrix A in MATLAB? a) size(A) b) length(A) c) dimension(A) d) lengthof(A) Answer: a) size(A) Which MATLAB function is used to compute the transpose of a matrix? a) transpose() b) trans() c) t() d) flip() Answer: a) transpose() What does the MATLAB function fft() do? a) Computes the Fast Fourier Transform of a signal b) Performs a matrix factorization c) Finds the frequency of a signal d) Calculates the factorial of a number Answer: a) Computes the Fast Fourier Transform of a signal Which function is used to read data from a file in MATLAB? a) read() b) import() c) load() d) fread() Answer: c) load() What does the clc command do in MATLAB? a) Clears the command window b) Closes all figures c) Clears the workspace d) Compiles the script Answer: a) Clears the command window How can you create a function in MATLAB? a) Using function keyword b) Using define keyword c) Using create keyword d) Using subroutine keyword Answer: a) Using function keyword Which MATLAB function is used to perform element-wise multiplication of matrices? a) * b) .* c) multiply() d) elemmul() Answer: b) .* What is the result of the MATLAB command size([1 2; 3 4; 5 6])? a) [3 2] b) [2 3] c) [3 3] d) [2 2] Answer: a) [3 2] How do you create a subplot with 2 rows and 3 columns in MATLAB? a) subplot(2, 3, n) b) subplot(3, 2, n) c) subplot(2, 3) d) subplot(n, 2, 3) Answer: a) subplot(2, 3, n) Which function is used to calculate the mean of a dataset in MATLAB? a) average() b) mean() c) median() d) mode() Answer: b) mean() What is the purpose of the fmincon() function in MATLAB? a) To find the minimum value of a function with constraints b) To perform curve fitting c) To compute the Fourier transform d) To solve linear equations Answer: a) To find the minimum value of a function with constraints How do you concatenate two matrices horizontally in MATLAB? a) Using concat() b) Using [A, B] c) Using join(A, B) d) Using hcat(A, B) Answer: b) Using [A, B] Which function is used to perform a correlation analysis in MATLAB? a) correlate() b) corr() c) correlation() d) crosscorr() Answer: b) corr() What does the clear command do in MATLAB? a) Clears the command window b) Clears the workspace variables c) Clears the current figure d) Clears the console output Answer: b) Clears the workspace variables Which function is used to calculate the norm of a matrix in MATLAB? a) norm() b) length() c) measure() d) calculate() Answer: a) norm() How do you transpose a matrix A in MATLAB? a) A’ b) transpose(A) c) flip(A) d) A.T Answer: a) A’ What is the function of ode45() in MATLAB? a) To solve ordinary differential equations b) To optimize functions c) To perform matrix operations d) To compute eigenvalues Answer: a) To solve ordinary differential equations Which MATLAB function would you use to find the index of the maximum element in an array? a) findmax() b) max() c) indexmax() d) maxindex() Answer: b) max() What does the MATLAB function bode() plot? a) Time response of a system b) Frequency response of a system c) Step response of a system d) Impulse response of a system Answer: b) Frequency response of a system How do you save a MATLAB figure to a file? a) savefig() b) exportgraphics() c) save() d) print() Answer: d) print() Which function is used to sort elements of a matrix in MATLAB? a) sort() b) order() c) arrange() d) sortmatrix() Answer: a) sort() How can you display the current working directory in MATLAB? a) pwd() b) dir() c) path() d) workingdirectory() Answer: a) pwd() What does the mesh() function do in MATLAB? a) Creates a 3D surface plot b) Generates a mesh grid c) Plots 2D data d) Creates a 3D wireframe plot Answer: d) Creates a 3D wireframe plot Which function is used to generate a random integer in MATLAB? a) rand() b) randint() c) randi() d) randomint() Answer: c) randi() What does length(A) return when A is a vector? a) The number of columns in A b) The number of rows in A c) The total number of elements in A d) The largest element in A Answer: c) The total number of elements in A Which MATLAB command is used to close all open figure windows? a) close all b) clear all c) delete all d) close() Answer: a) close all What does the hist() function create in MATLAB? a) A bar graph b) A pie chart c) A histogram d) A scatter plot Answer: c) A histogram How do you convert a string to a number in MATLAB? a) str2num() b) num2str() c) string2number() d) convert() Answer: a) str2num() Which MATLAB function is used to plot a 2D histogram? a) hist() b) hist2() c) hist3() d) histogram() Answer: d) histogram() What is the purpose of the axis function in MATLAB? a) To set or query the axis limits of a plot b) To create 3D plots c) To compute matrix operations d) To perform data fitting Answer: a) To set or query the axis limits of a plot How can you import a CSV file into MATLAB? a) import() b) csvread() c) readcsv() d) loadcsv() Answer: b) csvread() Which function is used to calculate the correlation coefficient between two vectors in MATLAB? a) corrcoef() b) correlate() c) corr() d) coef() Answer: a) corrcoef() What does the fill() function do in MATLAB? a) Fills a plot with color b) Fills missing values in a dataset c) Fills a matrix with zeros d) Fills a vector with NaNs Answer: a) Fills a plot with color

More MCQs on Aeronautical Engineering

Core Engineering Subjects MCQs Aeronautical Engineering:  

Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials