Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle.
<<https://i.imgu...
3年以上 前
解決済み
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...
3年以上 前
解決済み
square root
Find the square root (y) of an input (x).
3年以上 前
解決済み
Square a Number
Given an input x, return y, which is equal to the square of x.
The great 82-year-old
Let's answer the question below;
'I am *x* years old and I have never written programs.
If I study from now, will I be able ...
3年以上 前
解決済み
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
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 Celsi...
3年以上 前
解決済み
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:*
Many important observations in math and science can be described by short, but powerful, equations...
Force and Motion 3
Two robots push on a large object in the same direction. One robot pushes with a force of F1 Newtons and the other with a force...
3年以上 前
解決済み
Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...
3年以上 前
解決済み
Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places:
e.g. x = 2.3456 --> y = 2.346
3年以上 前
解決済み
MATLAB Basic: rounding IV
Do rounding towards plus infinity.
Example: -8.8, answer -8
+8.1 answer 9
+8.50 answer 9