Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by:
x = 1/2 gt^2
write a function that calculat...
約2年 前
解決済み
Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle.
Example:
[3 4 5] -> 2.5
Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row.
This also applies...
約2年 前
解決済み
Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.
約2年 前
解決済み
Area of a pentagon
Given the side of a regular pentagon and its apothem return the area of pentagon.
Remember the area of pentagon is calculate ...
約2年 前
解決済み
Remove All elements less than 5
Given an input vector x, remove all elements of x less than 5 .
Example:
Input x = [ 1 2 5 7 3 ]
Output y is [ 5 7 ...
約2年 前
解決済み
Initialize a Natural Number matrix.
Given length of matrix initialize a matrix consisting of natural numbers from 1 to n:
n = 10;
x = [ 1 2 3 4 5 6 7 8 9 10];
...
Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series:
pi/4 = 1 - 1/3 + 1/5 - 1/7 + ...
For a given numbe...
約2年 前
解決済み
Pi Estimate 1
Estimate Pi as described in the following link:
<http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>
約2年 前
解決済み
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...
約2年 前
解決済み
Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.
約2年 前
解決済み
Where is she?
Given the numbers 12, 3, 6, 9
Tell where the girl is located. That is:
Look to your 3 o'clock = look right
Example
...
約2年 前
解決済み
Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.