Find all prime factors of the input
Given an input x, find its all prime factors. Return the vector with all factors in ascending order.
Efficiency is the key here...
Multiply a column by a row
* Given a column vector C and and a row vector R.
* Output a matrix M.
* Every column of M equals to C multiplied by correspon...
2年以上 前
解決済み
Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n.
Examples
If input t1=1, r=1, n=7 the...
2年以上 前
解決済み
07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6
Magic squares are defined as square matrices, where the sum of a...
2年以上 前
解決済み
07 - Common functions and indexing 4
Define the matrix _cMat_:
<<http://samle.dk/STTBDP/Assignment1_3c.png>>
( _cMat_ = 10x10 matrix where the numbers from 1 t...
2年以上 前
解決済み
07 - Common functions and indexing 5
Create the vector _lin_:
<<http://samle.dk/STTBDP/Assignment1_7e.png>>
(the integers from 1 to 20)
Make every other val...
2年以上 前
解決済み
07 - Common functions and indexing 3
Define _eMat_:
<<http://samle.dk/STTBDP/Assignment1_3e.png>>
Create the variable _eMat2_, which is equal to _eMat_ with th...
2年以上 前
解決済み
07 - Common functions and indexing 2
Define _eMat_:
<<http://samle.dk/STTBDP/Assignment1_3e.png>>
Calculate eMean as the mean across the rows of _eMat_. The an...
2年以上 前
解決済み
02 - Vector Variables 5
_eVec_ = _Hello_
( _eVec_ is a string, which is a vector of characters )
2年以上 前
解決済み
07 - Common functions and indexing 1
Define _cMat_:
<<http://samle.dk/STTBDP/Assignment1_3c.png>>
( _cMat_ = 10x10 matrix where the numbers from 1 to 100 runs ...