Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...
4年弱 前
解決済み
Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not.
eg. x = 1884
output = 1
eg. x = 3
output = 0
4年弱 前
解決済み
Evaluating a polynomial
Given the following polynomial and the value for x, determine y.
y = 3x^5 – x^3 + 8x – 3
Example
x = 1
y = 3 - 1 +...
4年弱 前
解決済み
Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.
Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...
4年弱 前
解決済み
NCHOOSEK - Time Optimization
*Input*
* *V* —— Set of all choices, a vector of N, 1 < N < 100
* *K* —— Number of selected choices, a scalar, 0 <= K <=...
4年弱 前
解決済み
Possible Outcomes of American Roulette
The payout for American roulette can be calculated by:
payout = (38/n)-1
where n is the number of squares the bet covers.
...
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
4年弱 前
解決済み
Times 2 - START HERE
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Examples:...