Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.]
Non-scor...
9年以上 前
解決済み
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...
9年以上 前
解決済み
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.
<<http://upload...
Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example:
[q,r] = swap(5,10)
returns q = ...
9年以上 前
解決済み
Add two numbers
Calculate the sum of two numbers.
Example
input = [2 3]
output = 5
9年以上 前
解決済み
Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...
9年以上 前
解決済み
The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".
9年以上 前
解決済み
Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0.
a = 3;
b = [1,2,4];
Returns 0.
a = 3;
b = [1,...
9年以上 前
解決済み
Add offset to a signal
Produce the following signal:
<<http://blogs.mathworks.com/images/seth/cody/add-offset-eqn.png>>
You should see a downward...
9年以上 前
解決済み
Produce a sine wave
Produce a sine wave with amplitude 3:
<<http://blogs.mathworks.com/images/seth/cody/sine-eqn.png>>
9年以上 前
解決済み
Add a block to a model
Produce the following signal:
<<http://blogs.mathworks.com/images/seth/cody/add-block-eqn.png>>
In this case, the slope of...
9年以上 前
解決済み
Produce a cosine wave
Produce the following signal:
<<http://blogs.mathworks.com/images/seth/cody/cosine-eqn.png>>
9年以上 前
解決済み
Connect blocks in a model
Connect the blocks in the model to produce the following signal:
<<http://blogs.mathworks.com/images/seth/cody/connect-blocks...
9年以上 前
解決済み
Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x.
<<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...
9年以上 前
解決済み
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...
9年以上 前
解決済み
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 righ...
9年以上 前
解決済み
Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle.
<<http://upload....