Solved

MATLAB Basic: rounding III

Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

5 months ago

Solved

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

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

5 months ago

Solved

Find the sides of an isosceles triangle when given its area and height from its base to apex

Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and ...

5 months ago

Solved

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

5 months ago

Solved

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

6 months ago

Solved

Is X a Fibonacci Matrix?

In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...

6 months ago

Solved

Return fibonacci sequence do not use loop and condition

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

6 months ago

Solved

Find the next Fibonacci number

In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...

7 months ago

Solved

Integer Sequence - II : New Fibonacci

Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

7 months ago

Solved

Return the Fibonacci Sequence

Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

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

7 months ago

Solved

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

7 months ago

Solved

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.

9 months ago

Solved

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

9 months ago

Solved

Calculate the centroid of a triangle

Info: https://en.wikipedia.org/wiki/Centroid Example Input: x = [0 0 1]; % x-coordinate y = [0 1 0]; % y-coordinat...

9 months ago

Solved

Triangle Numbers

Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

1 year ago

Submitted

Finite Difference Explicit Method for Fick's 2nd Law

Finite Difference Explicit Method (iteration) to solve for a PDE (Fick's 2nd Law of diffusion)

2 years ago | 9 downloads |

Submitted

Finite Difference Implicit Method for Fick's 2nd Law

PDE solution using the implicit method

2 years ago | 6 downloads |

Submitted

FEM to solve for 2D Laplace's Equation

FEM solution to a steady-state PDE (example: Laplace's) applied to an electric potential

2 years ago | 12 downloads |

Submitted

Vector field rotation using Rotation (Transformation) matrix

Animation to demonstrate the use of the 2D rotation matrix in a vector field

2 years ago | 1 download |

Submitted

Truss 3D (Tetrahedral) using FEM (direct stiffness)

Deformation of a tetrahedral truss (4 nodes and 6 elements) with 3 pinned bottom nodes and downward force applied to the top nod...

2 years ago | 4 downloads |

Submitted

Fick's 2nd Law of Diffusion using Method of Lines

PDE solution using Method of Lines

2 years ago | 2 downloads |

Submitted

Fick's 2nd Law of Diffusion using FEM (Direct Stiffness)

Direct stiffness finite element method to solve for c (concentration) at given x (1D space) and t (time) values

2 years ago | 5 downloads |

Submitted

Graph of a 3D vector field and its divergence and curl

Visualize vector field quiver, divergence (slice), and curl (quiver) at given 3D coordinates

2 years ago | 9 downloads |

Submitted

Graph of a 2D vector field equation and its divergence

Visualize vector field using quiver and divergence using filled contour at given 2D coordinates

2 years ago | 7 downloads |

Submitted

Divergence Theorem (Gaussâ€™, Ostrogradskyâ€™s) to Measure Flow

Example showing that the volume integral of the divergence of f = surface integral of the magnitude of f normal to the surface (...

2 years ago | 11 downloads |

Solved

Summing Digits within Text

Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

2 years ago

Solved

Indexed Probability Table

This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

2 years ago