The Piggy Bank Problem
Given a cylindrical piggy bank with radius g and height y, return the bank's volume. [ g is first input argument.]
Bonus though...
5ヶ月 前
解決済み
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
Basic commands - rounding
make a function which will round to integer, which is nearer to zero.
Example
x=[-2.5 2];
y=[-2 2];
5ヶ月 前
解決済み
Basic commands - amount of inputs
Make a function, which will return amount of given inputs
Example:
amountinput(1,2,4,3,10) -> 5 , because we gave functio...
5ヶ月 前
解決済み
BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum.
Examp...
5ヶ月 前
解決済み
cross in array
Make a cross from "1" in odd size array. Other value from array should be equal to "0";
As input you get length of side of arra...
5ヶ月 前
解決済み
angle in regular polygon
Make a function which returns measure of interior angle in x-side regular polygon. x is as input.
Please pay attention, that 1 ...
5ヶ月 前
解決済み
Create a vector
Create a vector from 0 to n by intervals of 2.
5ヶ月 前
解決済み
What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...
Ohm’s Law - Calculate Resistance
Ohm’s Law states that resistance R can be calculated as:R=V/I
where:
V is the voltage (in volts)
I is the current (in ampere...
5ヶ月 前
解決済み
Simple Electrical Power Calculation
Calculate the electrical power using the formula:
P=V×I
where:
V is the voltage (in volts)
I is the current (in amperes)
5ヶ月 前
解決済み
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".
5ヶ月 前
解決済み
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...