prime test 2
enter the only non prime,non composite number
5年弱 前
解決済み
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...
count upper and lower case characters
In a given input string, count and return the number of upper and lower case characters as u and l respectively.
For example:...
Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.
5年弱 前
解決済み
Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero?
Clue:
He was the first in the line ...
5年弱 前
解決済み
CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A)
For example tan(A)=3/4 then sin(A)=3/5
5年弱 前
解決済み
Determine the mean of matrix
Determine the mean of matrix without using mean function
Hint: use simple algorithm
5年弱 前
解決済み
MATLAB Basic: rounding III
Do rounding towards minus infinity.
Example: -8.8, answer -9
+8.1 answer 8
+8.50 answer 8
5年弱 前
解決済み
sum of non-primes
The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38
Find the sum of all the positive non-prime integers that do no...
5年弱 前
解決済み
Squaring Matrix
Square the following matrix using matlab
%
A = 1 2 3 4
5 6 7 8
So new matrix should display...
5年弱 前
解決済み
Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not.
Example:
1:7 -> 0
[7 5 2] -> 1
5年弱 前
解決済み
Convert a vector into a number
This is a sub problem related to this problem:
<http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...