Feeds
已解决
Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...
3 months 前
已解决
Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x2, y...
3 months 前
已解决
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If p is the perimeter of a right angle triangle with integral length sides, { a, b, c }, there are exactly three solutions for p...
3 months 前
已解决
Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.
3 months 前
已解决
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...
3 months 前
已解决
Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<https://i.imgur.com/jlZDHhq.png>> ...
3 months 前
已解决
Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vertices of ...
3 months 前
已解决
Adding Inset Plots
You can use the axes function to define the position of an empty x/y axis. The position is measured relative the the bottom left...
3 months 前
已解决
Jack O'Lantern
If visualized correctly, the data contained in the matrix A will look like a jack-o'-lantern. Create a function that will visu...
3 months 前
已解决
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...
3 months 前
已解决
3D Plots and Colorbars
Use the matrices X, Y, and Z provided in the function template to create a surface plot. Add a colorbar to the surface plot and ...
3 months 前
已解决
Plot Line Specifications
Create a line plot for function cos(x) where x is a vector of linearly spaced values going from 0 to input N with an increment o...
3 months 前
已解决
Create a figure and plot data
Given two data vectors (x,y), open a new figure and plot the data. Return the figure handle.
3 months 前
已解决
Reproduce this plot!
Write a function that will take a dataset (x,y), a best fit model (model), and the upper and lower prediction bounds (lb,ub) for...
3 months 前
已解决
Power Outages Histogram
Create a function that takes power outage data as an input and creates a histogram of the number of outages as a function of Reg...
3 months 前
已解决
Numerical Integration
Input * |x0|, a real number greater than 0 Output * |I|, a numerical estimate of the integral x0 / I...
3 months 前
已解决
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. ...
3 months 前
已解决
There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...
3 months 前
已解决
The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...
3 months 前
已解决
Monte-Carlo integration
Write a function that estimates a d-dimensional integral to at least 1% relative precision. Inputs: * d: positive integer....
3 months 前
已解决
Differential equations I
Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...
4 months 前
已解决
Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Input...
4 months 前
已解决
Throwing Dice - Will You Be Eaten By The Dragon?
You and a dragon have agreed to let dice rolls determine whether it eats you or not. The dragon will roll a single die, of x si...
4 months 前
已解决
Chess probability
The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...
4 months 前
已解决
Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...
4 months 前
已解决
Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...
4 months 前
已解决
Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.
4 months 前
已解决
Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]
4 months 前

