I'm just this guy, you know

Solved

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...

ongeveer 2 maanden ago

Solved

Calculate Inner Product

Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

ongeveer 2 maanden ago

Solved

Find MPG of Lightest Cars

The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

ongeveer 2 maanden ago

Solved

Find the Best Hotels

Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

ongeveer 2 maanden ago

Solved

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...

ongeveer 2 maanden ago

Solved

Calculate BMI

Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

ongeveer 2 maanden ago

Solved

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...

ongeveer 2 maanden ago

Solved

Calculate a Damped Sinusoid

The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...

ongeveer 2 maanden ago

Solved

Solve a System of Linear Equations

*Example*: If a system of linear equations in _x₁_ and _x₂_ is: 2 _x₁_ + _x₂_ = 2 _x₁...

ongeveer 2 maanden ago

Solved

Verify Law of Large Numbers

If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

ongeveer 2 maanden ago

Solved

Find the Oldest Person in a Room

Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

ongeveer 2 maanden ago

Solved

Convert from Fahrenheit to Celsius

Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

ongeveer 2 maanden ago

Solved

Calculate Amount of Cake Frosting

Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

ongeveer 2 maanden ago

Solved

Sorting integers by their digits (Level 3)

This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42811-sorting-integers-by-their-digits-level...

ongeveer 2 maanden ago

Solved

Sorting integers by their digits (Level 2)

This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42809-sorting-integers-by-their-digits Probl...

ongeveer 2 maanden ago

Solved

Sorting integers by their digits (Level 1)

Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

ongeveer 2 maanden ago

Solved

Find last non-zero in a given dimension

You are given a logical matrix *BW* _of any dimension_, and a dimension *dim*. You need to find the locations of the last non-ze...

ongeveer 2 maanden ago

Solved

longest sequence of nans

In an array return the length of longest sequence of nans for each column. x = [ 2 3 1 2 5 6; nan nan 5 n...

ongeveer 2 maanden ago

Solved

Sum my indices

Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

ongeveer 2 maanden ago

Solved

Combine Data With Gaps

Combine data sets a and b where the datasets have "gaps" or unique points. Example: Input a = [1,0; 2,1; ...

ongeveer 2 maanden ago

Solved

Pancake sorting - minimum flips.

Sort a stack of pancakes by flipping them using spatula. * There are _N_ pancakes with diameters _1:N_. * Spatula can be ins...

ongeveer 2 maanden ago

Solved

Pancake sorting

Sort a stack of pancakes by flipping them using spatula. * There are _N_ pancakes with diameters _1:N_. * Spatula can be ins...

ongeveer 2 maanden ago

Solved

How close to a hole

Suppose you have a description of good places (ones) and bad places (zeros). You want to know your distance from a bad place (in...

ongeveer 2 maanden ago

Solved

Split array into pieces according to corresponding array

An array x of length n has values 1...m with each value appearing at least once. The values are sorted (n>=m). A second...

ongeveer 2 maanden ago

Solved

Find the distance between runs

Another question inspired by the <http://uk.mathworks.com/matlabcentral/answers/?s_tid=gn_mlc_an answers forum>: A vector of ...

ongeveer 2 maanden ago

Solved

Find the same and successive values in a vector

Find the same and successive values in a vector. For example: Input x = [ 1 0 0 1 1 1 1 0 1 1 1 0 0 0 1 ] Start and end...

ongeveer 2 maanden ago

Solved

Find Elements in Range

Based on a question on <http://www.mathworks.com/matlabcentral/answers/ MATLAB Answers>. Find all the elements of a vector wh...

ongeveer 2 maanden ago

Solved

Find indices of diagonal elements

Given a matrix A and a diagonal index d (where 0 indicates the main diagonal and off-diagonals are identified by positive and n...

ongeveer 2 maanden ago

Solved

How to reverse spdiags ?

The spdiags function extracts all nonzero diagonals from the m-by-n matrix A. So if A=[1 2 3;4 5 6;7 8 9], spdiags(A)=[7 4...

ongeveer 2 maanden ago

Solved

Neither minima nor maxima

Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

ongeveer 2 maanden ago