Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...
3 years 前
已解决
Count number of words in string
Count number of words in string
Examples
'hi', answer is 1
'hi hi', answer is 2
'I enjoy cody', answer is 3
3 years 前
已解决
Check that number is whole number
Check that number is whole number
Say x=15, then answer is 1.
x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...
3 years 前
已解决
Orthonormal matrix
You decide whether any given matrix is an orthonormal matrix or not.
If each column in a matrix is perpendicular to the other...
Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...
3 years 前
已解决
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 ...
3 years 前
已解决
Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match.
* If they match, create an output variable |z|...
3 years 前
已解决
Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...
3 years 前
已解决
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...