Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV'
|
II | I
| ...
5年以上 前
解決済み
Remove the positive integers.
Given array,x, remove all the positive numbers and display ouput as y.
Example x=[1 -2 3 -4] , output is y=[-2 -4].
5年以上 前
解決済み
Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?;
x = [1 : 0.5 : 6];
y ...
5年以上 前
解決済み
Is My Wife Wrong?
Answer the question.
(see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...
5年以上 前
解決済み
Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15
5年以上 前
解決済み
0<=x<=pi?
Check whether the given angle is between zero and pi.
Return logical true or false.
5年以上 前
解決済み
Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example,
x=[1 2 3] ----> y = [1.5 2.5]
x=[1...
5年以上 前
解決済み
Box!
Given a box, find the volume of the cube. With each side = a.
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 ...
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...
5年以上 前
解決済み
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...
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...
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年以上 前
解決済み
Roots of quadratic equation
Given a quadratic equation ax^2 + bx + c = 0, write a function to return its roots.
5年以上 前
解決済み
volume of torus
Find volume of torus with a as major radius and b as minor
5年以上 前
解決済み
Is it prime?
Given a number, check whether it is prime or not.
If prime output is true, otherwise false.
5年以上 前
解決済み
Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input