Feeds
已解决
Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
5 hours 前
已解决
Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...
5 hours 前
已解决
Balanced Ternary Numbers: Easy as |, |-, |o
This problem concerns the so-called <http://en.wikipedia.org/wiki/Balanced_ternary balanced ternary> system for representing num...
5 hours 前
已解决
Break it up! Break it up!
You have N pennies. Write a Matlab script that will reveal how many different ways you can break up those pennies. For example...
5 hours 前
已解决
Cryptomath: Addition
W A I T + A L L --------- G I F T S equals: 9 6 0 8 + 6 7 7 --------- 1 0 2 8 5 Given str...
5 hours 前
已解决
Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...
5 hours 前
已解决
Guess the number I'm thinking of (Part 1)
In this game you are competing against two other people to guess the number that I'm thinking of. I randomly choose an integer ...
5 hours 前
已解决
Create a random vector of integers with given sum
Your task today is to write a function that returns a vector of integer numbers, between, and including, 1 and m, of which the s...
5 hours 前
已解决
Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...
5 hours 前
已解决
Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...
5 hours 前
已解决
Generating random matrix with given probability mass function
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/2356-simulating-the-selection-of-a-state-with-given-probabilit...
5 hours 前
已解决
Given n, create n random numbers such that their standard deviation is also n.
Given n, create n random numbers such that their standard deviation is also n.
5 hours 前
已解决
Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...
5 hours 前
已解决
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 hours 前
已解决
Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<https://imgur...
5 hours 前
已解决
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 hours 前
已解决
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 hours 前
已解决
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 hours 前
已解决
Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the second...
5 hours 前
已解决
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 right-...
5 hours 前
已解决
Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? Image courtesy of Wikipedia.
5 hours 前
已解决
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...
5 hours 前
已解决
Plotting Practice
Plot cos(x) vs x as shown in the figure below. Include the appropriate title, x-label, and y-label. Note, it is case sensitive. ...
5 hours 前
已解决
Sieve of Eratosthenes - 02
"Sift the Two's and Sift the Three's, The Sieve of Eratosthenes. When the multiples sublime, The numbers that remain a...
6 hours 前
已解决
Travelling Salesman Problem (TSP)
Find a short way through given points. This is the travelling salesman problem. But the solution should be a fast and small func...
6 hours 前
已解决
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
6 hours 前
已解决
Parcel Routing
Given a matrix that represent the distance along highways between major cities numbered 1 to _N_, provide the path and shortest ...
6 hours 前
已解决
Graph Algorithms 3: Number of Connected Components
Given an adjacency matrix of a simple undirected graph, find the number of connected components.
6 hours 前



