Determine if input is a perfect number
A <http://en.wikipedia.org/wiki/Perfect_number/ perfect number> occurs whent the sum of all divisors of a positive integer, exce...
Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man?
Give the name of that man, who, by popular believe, can ...
3年以上 前
解決済み
Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input matrix and row and column, output the index of th...
3年以上 前
解決済み
05 - Vector Equations 1
Define the vector _cVec_:
<<http://samle.dk/STTBDP/Assignment1_2c.png>>
(all the numbers from 5 to -5 in increments of -0....
3年以上 前
解決済み
Swap two numbers
Example
Input:
a = 10
b = 20
Output
a = 20
b = 10
3年以上 前
解決済み
matlab indian players
answer is one of the indian matlab player(just for fun dont take serious)
Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN.
Example:
input: x = [1 2 5 12 10 7]
...
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...
3年以上 前
解決済み
Negative matrix
Change the sign of all elements in given matrix.
3年以上 前
解決済み
What percentage?
Calculate the output c as the percentage of a on b for given a and b.