02 - Vector Variables 2
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_2b.png>>
9年以上 前
解決済み
Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...
9年以上 前
解決済み
Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15
9年以上 前
解決済み
Summation of array
Given an array, Find the sum of all of the elements in it
Examples:
Input x = [1 2 3 5; 4 5 6 7];
Output y is 33
9年以上 前
解決済み
Matlab Basics II - Velocity of a particle
A particle is moving in space, such that it's velocity is given by:
<<http://s30.postimg.org/5rf1xtvj5/cody1.png>>
write a...
Area of a circle
Given the radius x, y would be the area of a circle.
Pi = 3.1416
9年以上 前
解決済み
Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements.
Example:
x = [1 2 ...
9年以上 前
解決済み
Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n.
Example
For n = 2
then sum of squares = 5 (1^2 + ...
9年以上 前
解決済み
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1.
Hint: use increment.
9年以上 前
解決済み
square root
Find the square root (y) of an input (x).
9年以上 前
解決済み
Square the input
Given a scalar or vector x, return the square of each element.
Example
x = [7 2]
answer = [49 4]
Unit Matrix
Given n, you should return an n-by-n unit matrix.
Example:
If input is n=2 then
A = [ 1 0
0 1 ]
If input ...
9年以上 前
解決済み
Squaring Matrix
Square the following matrix using matlab
%
A = 1 2 3 4
5 6 7 8
So new matrix should display...
9年以上 前
解決済み
Sum of series V
What is the sum of the following sequence:
Σk(k+1) for k=1...n
for different n?
9年以上 前
解決済み
metre to feet converter
The idea is to make a converter, which exchange meters to feets.
We use a factor of 1m = 3.281*1f.
so 3m are equals to 9.843 m...