Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by:
x = 1/2 gt^2
write a function that calculat...
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 +...
9年以上 前
解決済み
Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix
Grades=[98 56 34 100 88 87]
**re...
9年以上 前
解決済み
Counting down
Create a vector that counts from 450 to 200 in increments of 10.
Multielement indexing of a row array
The row array birthRateChina stores the China birth rate (per 1000 people) for years 2000 to 2012. Write a statement that create...
9年以上 前
解決済み
Add two numbers
Calculate the sum of two numbers.
Example
input = [2 3]
output = 5
9年以上 前
解決済み
Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.
Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts
example:
a = 1, b = 2
output = 1 1.25 ...
Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*!
And I'm talking about a unicorn with not more than one horn on it!
9年以上 前
解決済み
Double colon operator: Counting up
* Construct a row array countValues from 1 to endValue, using the double colon operator.
Ex: If endValue is 5, countValues s...