A résolu


select the primes of a vector
Find the prime numbers in a vector

presque 9 ans il y a

A résolu


convert matrix to single column
given any matrix, convert it to single column

presque 9 ans il y a

A résolu


Matlab Basics - y as a function of x
Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2

presque 9 ans il y a

A résolu


Magic!
Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

presque 9 ans il y a

A résolu


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

presque 9 ans il y a

A résolu


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

presque 9 ans il y a

A résolu


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

presque 9 ans il y a

A résolu


Rounding
Round 10.67 and make 'y' equal to that number.

presque 9 ans il y a

A résolu


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

presque 9 ans il y a

A résolu


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

presque 9 ans il y a

A résolu


give nth decimal place of pi
max 15th place after the decimal point is ok for now

presque 9 ans il y a

A résolu


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

environ 9 ans il y a

A résolu


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 ...

environ 9 ans il y a

A résolu


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...

environ 9 ans il y a

A résolu


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

environ 9 ans il y a

A résolu


Find the binary code
Given a sinusoidal signal, create a function that returns the binary code of a quantized value. The function takes the bit lengt...

environ 9 ans il y a

A résolu


Sum the rows
Sum the rows of the given matrix. Example x = [ 1 2 3 4 ] y = [ 3 7 ]

environ 9 ans il y a

A résolu


true or false
if the matrix has a zero, return true. else, return false

environ 9 ans il y a

A résolu


Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

environ 9 ans il y a

A résolu


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

environ 9 ans il y a

A résolu


03 - Matrix Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

environ 9 ans il y a

A résolu


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...

environ 9 ans il y a

A résolu


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

environ 9 ans il y a

A résolu


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

environ 9 ans il y a

A résolu


Transpose matrix
Given an m x n matrix, transpose it.

plus de 9 ans il y a

A résolu


Calculate correlation.
There are two data. y1=[0 1 2 3 4]' y2=[2 3 4 5 6]' We can see positive relationship between y1 and y2. The relations...

plus de 9 ans il y a

A résolu


Move if I am Optimus Prime
If the number is a prime, roll out!

plus de 9 ans il y a

A résolu


Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

plus de 9 ans il y a

A résolu


Primes Checker
Given variable inputs Check if they are prime numbers

plus de 9 ans il y a

A résolu


Create tangent function out of cosine only
Please don't use tangent and sine functions

plus de 9 ans il y a

Charger plus