Determinant of a 3x3 Matrix
Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.
4年弱 前
解決済み
The 5th Root
Write a function to find the 5th root of a number.
It sounds easy, but the typical functions are not allowed (see the test su...
4年弱 前
解決済み
How many bottles can you drink?
Sometimes if you buy a drink in a glass bottle you can return that bottle and get some money back.
Let's assume we have "x" a...
4年弱 前
解決済み
~~~~~~~ WAVE ~~~~~~~~~
|The WAVE generator|
Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...
4年弱 前
解決済み
Basics - not so easy division
Please make a function whcih divides x/y, but pay attention for some exceptions with NaN,0,Inf. Sometimes return "ERROR" instead...
Basic commands - rounding
make a function which will round to integer, which is nearer to zero.
Example
x=[-2.5 2];
y=[-2 2];
4年弱 前
解決済み
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...
4年弱 前
解決済み
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...
4年弱 前
解決済み
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...
4年弱 前
解決済み
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 ...
Probabilities - Balls and urns - 02
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...
UICBioE240 problem 1.1
Remove the middle row from a matrix, assuming # of rows is odd.
So if
A = [ 1 2 3;
4 5 6;
7 8 9]
the...
4年弱 前
解決済み
UICBioE240 problem 1.8
Given a list of grades in a class, write a script that gives the 2nd highest grade in the class and the average for the class.
...