Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice.
Ex...
Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...
4年弱 前
解決済み
Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...
4年弱 前
解決済み
Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...
4年弱 前
解決済み
02 - Vector Variables 3
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_2c.png>>
(all the numbers from 5 to -5 in increments of ...
4年弱 前
解決済み
Negative matrix
Change the sign of all elements in given matrix.
4年弱 前
解決済み
Convert from Base 10 to base 5
Convert the input number from base 10 into base 5:
for example:
if a(in base 10)= 5
then a(in base 5)= 10
Matrix rotation as per given angle
Given a user defined matrix and angle of rotation, rotate the elements of output matrix as clockwise or anti-clockwise. Angle wi...
4年弱 前
解決済み
Matrix to column conversion
Given a matrix of any size, convert it into a column vector.
e.g A=[10 20 30;
40 50 60]
then,
B = [10;
40;
...
4年弱 前
解決済み
Check if sorted
Check if sorted.
Example:
Input x = [1 2 0]
Output y is 0
4年弱 前
解決済み
Cos Function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.
4年弱 前
解決済み
Determina si el número es primo
Primero, antes que nada: ¿Qué es un número primo?
Un número primo es cualquier número que solamente se puede dividir por 1 y ...
4年弱 前
解決済み
Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?;
x = [1 : 0.5 : 6];
y ...