matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below.
...
11ヶ月 前
解決済み
counting for loop
Complete the function below using a for loop to count from 3 to N by 2. For example, if N is 10, count 3, 5, 7, 9 and stop. Fo...
11ヶ月 前
解決済み
If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...
11ヶ月 前
解決済み
Max of a Vector
Write a function to return the max of a vector
11ヶ月 前
解決済み
Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...
11ヶ月 前
解決済み
Add two numbers
Calculate the sum of two numbers.
Example
input = [2 3]
output = 5
11ヶ月 前
解決済み
Min of a Matrix
Return the minimum value in the given matrix.
11ヶ月 前
解決済み
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 is n=4 th...
05 - Vector Equations 3
Define the vector _dVec_:
<<http://samle.dk/STTBDP/Assignment1_2d.png>>
(Logarithmically spaced numbers between 1 and 10)
...
11ヶ月 前
解決済み
02 - Vector Variables 1
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_2a.png>>
11ヶ月 前
解決済み
03 - Matrix Variables 2
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_3b.png>>
A 9x9 matrix of zeros, but with the following v...
11ヶ月 前
解決済み
05 - Vector Equations 2
Define the vectors _aVec_ and _bVec_:
<<http://samle.dk/STTBDP/Assignment1_2a.png>>
and
<<http://samle.dk/STTBDP/Assig...
11ヶ月 前
解決済み
02 - Vector Variables 4
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_2d.png>>
(Logarithmically spaced numbers between 1 and 1...
11ヶ月 前
解決済み
03 - Matrix Variables 5
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_3e.png>>
11ヶ月 前
解決済み
06 - Matrix Equations 2
Define the vectors _aVec_ and _bVec_:
<<http://samle.dk/STTBDP/Assignment1_2a.png>>
and
<<http://samle.dk/STTBDP/Assig...
11ヶ月 前
解決済み
03 - Matrix Variables 3
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_3c.png>>
A 10x10 matrix where the numbers from 1 to 100 ...
11ヶ月 前
解決済み
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...
11ヶ月 前
解決済み
Sum of series II
What is the sum of the following sequence:
Σ(2k-1)^2 for k=1...n
for different n?
Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.
11ヶ月 前
解決済み
Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit.
Examples:
Input celsiusValue = 100
Output fahrValu...