Feeds
已解决
Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...
17 days 前
已解决
Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...
17 days 前
已解决
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
17 days 前
已解决
Calculate the average value of the elements in the array
Calculate the average value of the elements in the array
17 days 前
已解决
the average value of the elements
Calculate the average value of the elements in the array
17 days 前
已解决
Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...
17 days 前
已解决
Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...
17 days 前
已解决
Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...
17 days 前
已解决
subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.
17 days 前
已解决
MatCAT - Reconstruct X from Its X-rays
Consider a matrix x x = [ 1 2 0 0 5 0 3 0 8 ] If we sum x along the rows we get row_sums = [3 5 11] ...
17 days 前
已解决
Matrix of Multiplication Facts
This is James's daughter again, sneaking into his Cody account. Thanks to your help in my math class last year, I did great! But...
17 days 前
已解决
Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...
17 days 前
已解决
matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...
17 days 前
已解决
Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...
17 days 前
已解决
Rescale Scores
Each column (except last) of matrix X contains students' scores in a course assignment or a test. The last column has a weighted...
17 days 前
已解决
Calculate Inner Product
Given two input matrices, x and y, check if their inner dimensions match. If they match, create an output variable z which cont...
17 days 前
已解决
Find MPG of Lightest Cars
The file cars.mat contains a table named cars with variables Model, MPG, Horsepower, Weight, and Acceleration for several classi...
17 days 前
已解决
Find the Best Hotels
Given three input variables: hotels - a list of hotel names ratings - their ratings in a city cutoff - the rating at which yo...
17 days 前
已解决
Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...
17 days 前
已解决
Calculate BMI
Given a matrix hw (height and weight) with two columns, calculate BMI using these formulas: 1 kilogram = 2.2 pounds 1 inch = 2...
17 days 前
已解决
Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...
17 days 前
已解决
Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as y = A.ⅇ^(-λt)*cos(2πft) where A, λ, and f are scalars and t is a vector. ...
17 days 前
已解决
Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...
17 days 前



