해결됨


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

5달 전

해결됨


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

5달 전

해결됨


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

5달 전

해결됨


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

5달 전

해결됨


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

5달 전

해결됨


5 Prime Numbers
Your function will be given lower and upper integer bounds. Your task is to return a vector containing the first five prime numb...

5달 전

해결됨


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

5달 전

해결됨


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

5달 전

해결됨


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

5달 전

해결됨


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

5달 전

해결됨


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

5달 전

해결됨


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

5달 전

해결됨


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

5달 전

해결됨


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

5달 전

해결됨


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

5달 전

해결됨


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

5달 전

해결됨


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

5달 전

해결됨


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...

5달 전

해결됨


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

5달 전

해결됨


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

5달 전

해결됨


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

5달 전

해결됨


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

5달 전

해결됨


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

5달 전

해결됨


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

5달 전

해결됨


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

5달 전

해결됨


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

5달 전

해결됨


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

5달 전

해결됨


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

5달 전

해결됨


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.&#8519;^(-&lambda;t)*cos(2πft)| where |A|, |&lambda;|, and |f| ...

5달 전

해결됨


radius of a spherical planet
You just measured its surface area, that is the input.

5달 전

Load more