Solved


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

9 years ago

Solved


Multielement indexing of a row array
The row array birthRateChina stores the China birth rate (per 1000 people) for years 2000 to 2012. Write a statement that create...

9 years ago

Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

9 years ago

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

9 years ago

Solved


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

9 years ago

Solved


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

9 years ago

Solved


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

9 years ago

Solved


Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

9 years ago

Problem


Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

9 years ago | 16 | 2248 solvers

Solved


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

9 years ago

Solved


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

9 years ago

Answered
Coeffs functions needs revision
According to matlab documentation you should use c = coeffs(16*x^2 + 19*x + 11,'All')

9 years ago | 0

Answered
How do I write the Exponential Decay in Matlab?
Here is your solution for exponential regression: x=[0;1;2;3;4;5;6] y=[32;47;65;92;132;190;275] c=[ones(size(x)) x]\l...

9 years ago | 0

| accepted

Solved


tridiagonal matrix
Given vectors u and v, make a tri-diagonal symmetric matrix such that u is in the main diagonal and v is below and above diagona...

9 years ago

Problem


tridiagonal matrix
Given vectors u and v, make a tri-diagonal symmetric matrix such that u is in the main diagonal and v is below and above diagona...

9 years ago | 1 | 45 solvers

Solved


Determine Size of Matrix
Use any function that would output size of matrix

9 years ago

Solved


Ceil Me Now
Get the ceiling of the input matrix

9 years ago

Solved


Find my daddy long leg (No 's')
Given the ratio of the two legs,and the hypotenuse, find the value of the bigger leg

9 years ago

Solved


Calculate RMSE
RMSE(Root Mean Square Error) is widely used to calculate error. Calculate RMSE between [a] and [b] a=[1 2 3 4] b=[0 1 2 ...

9 years ago

Solved


Solve equation numerically
y'=y In order to solve equation using computer, numerical analysis are needed. 1st order Euler's method is one of the metho...

9 years ago

Solved


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

9 years ago

Solved


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

9 years ago

Solved


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

9 years ago

Solved


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

9 years ago

Solved


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

9 years ago

Solved


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

9 years ago

Solved


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

9 years ago

Load more