Risolto


02 - Vector Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

oltre 3 anni fa

Risolto


radius of a spherical planet
You just measured its surface area, that is the input.

oltre 3 anni fa

Risolto


03 - Matrix Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

oltre 3 anni fa

Risolto


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

oltre 3 anni fa

Risolto


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

oltre 3 anni fa

Risolto


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

oltre 3 anni fa

Risolto


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

oltre 3 anni fa

Risolto


Temperature Conversion 3

oltre 3 anni fa

Risolto


Temperature Conversion 2

oltre 3 anni fa

Risolto


Temperature Conversion 1

oltre 3 anni fa

Risolto


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:...

oltre 3 anni fa

Risolto


Nilpotent matrix
Check if matrix A is <http://mathworks.com/ nilpotent>.

oltre 3 anni fa

Risolto


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

oltre 3 anni fa

Risolto


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

oltre 3 anni fa

Risolto


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

oltre 3 anni fa

Risolto


Box
Give the volume of a box, x is equal to the body diagonal.

oltre 3 anni fa

Risolto


Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

oltre 3 anni fa

Risolto


Problem for beginners
Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

oltre 3 anni fa

Risolto


Problem for beginners
M is a nxm matrix. Swap the fist and the second last column with eachother. X=[1 2 3;4 5 6;7 8 9] Y=[2 1 3;5 4 6;8 7 9]

oltre 3 anni fa

Risolto


Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

oltre 3 anni fa

Risolto


Square
X is a number, write a code, where Y should be the square of X.

oltre 3 anni fa

Risolto


Matrix problem for beginners
Make a matrix [0,0,0;1,1,1;2,2,2]. X=[0,1,2]

oltre 3 anni fa

Risolto


Matrix for beginners
Multiply x and y elemwise.

oltre 3 anni fa

Risolto


Simple Matrix
Make the following matrix without typing it in one by one. [1 2 3; 2 4 6; 4 8 12] x=[1 2 3].

oltre 3 anni fa

Risolto


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

oltre 3 anni fa

Risolto


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

oltre 3 anni fa

Risolto


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

oltre 3 anni fa

Risolto


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

oltre 3 anni fa

Risolto


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

oltre 3 anni fa

Risolto


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

oltre 3 anni fa

Carica altro