Sum of unique multiples of 3 and 5
If we list all the natural numbers up to 15 that are multiples of 3 or 5, we get 3, 5, 6, 9, 10, 12 and 15. The sum of these mul...
Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)
1年以上 前
解決済み
Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input vector, output true or false whether it is a colu...
Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer:
e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2
1年以上 前
解決済み
Sum the rows
Sum the rows of the given matrix.
Example
x = [ 1 2
3 4 ]
y = [ 3
7 ]
1年以上 前
解決済み
Solve system of equation!
Given provided system of equation, and find x and y.
System of equation can be expressed as each term's coefficient. For exam...
1年以上 前
解決済み
Mode
Find the mode of the vector
Assumption: no vector is bimodal
Example 1: input=[1 2 3 4 4]; output=4
Example 2: input=[7...
1年以上 前
解決済み
Find Euclidean norm of given vector u.
Find Euclidean norm of given vector u.
https://en.wikipedia.org/wiki/Euclidean_distance
Example
x=[1 1]
result=sqrt(1^2+1^2...