Gelöst


Divisible by 8
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

mehr als 4 Jahre vor

Gelöst


Divisible by 7
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

mehr als 4 Jahre vor

Gelöst


the number of inputs
Find the number of the inputs of the function. example y = theinputnumber(x,k); function called theinputnumber has 2 in...

mehr als 4 Jahre vor

Gelöst


Nth root
Nth root of a number x

mehr als 4 Jahre vor

Gelöst


Feeling lucky?
Guess which number Cody is thinking (1 to 10)? (This is a game of luck more than skill. Good luck!)

mehr als 4 Jahre vor

Gelöst


If you have matrix A, create matrix B using matrix A as an "element"
A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

mehr als 4 Jahre vor

Gelöst


Convert Kilometers to Miles
Convert kilometers to miles. Consider 1 km = 0.62 mile. Note: Don't use the '*' operator.

mehr als 4 Jahre vor

Gelöst


Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Gelöst


Create a Standard Size Vector
Given an input x, create a row vector y from 1 to x with 5 elements.

mehr als 4 Jahre vor

Gelöst


Find hen's weight.
If hen weights x kilos on two legs, how much does it weights on one leg? Output the result.

mehr als 4 Jahre vor

Gelöst


Find out sum and carry of Binary adder
Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition. Examples Previo...

mehr als 4 Jahre vor

Gelöst


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

mehr als 4 Jahre vor

Gelöst


Sort the vector with the given index
Given x = [1 2 4 8 17] and t = [1 3 2 5 4] then y = [1 4 2 17 8].

mehr als 4 Jahre vor

Gelöst


How many Integers?
Count the integers in a given vector |v|. You *must* use a loop to count each element separately. Examples: Input: v...

mehr als 4 Jahre vor

Gelöst


Area of square
Find the area of a square whose diagonal length is given as x.

mehr als 4 Jahre vor

Gelöst


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

mehr als 4 Jahre vor

Gelöst


Is It a Palindrome?
Given a string or array, determine if it is a palindrome.

mehr als 4 Jahre vor

Gelöst


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

mehr als 4 Jahre vor

Gelöst


Rotate a matrix for 180 degree
Rotate a matrix for 180 degree for eg: x=[1 2 3 4] y=[4 3 2 1]

mehr als 4 Jahre vor

Gelöst


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

mehr als 4 Jahre vor

Gelöst


Add one raw in given matrix as shown in example
*Add one raw in given matrix as shown in example* A=[1 0;0 1]; X=[3 5]; Answer must be:[1 0; 0 1;3 5]

mehr als 4 Jahre vor

Gelöst


Basics - not so easy division
Please make a function whcih divides x/y, but pay attention for some exceptions with NaN,0,Inf. Sometimes return "ERROR" instead...

mehr als 4 Jahre vor

Gelöst


first element of matrix
find the first elements of a column matrix

mehr als 4 Jahre vor

Gelöst


MATLAB Counter
Write a function f = counter(x0,b) to construct a counter handle f that counts with an initial value x0 and a step size b. E...

mehr als 4 Jahre vor

Gelöst


Crate a vector of logarithmically spaced
Create a vector of logarithmically spaced from 10^0 to 10^x with n sample Example: if x=4 and n=3 Answer must be=[1 100 10...

mehr als 4 Jahre vor

Gelöst


Find the volume of cone
Find the volume of cone, when given radius(r) and height(h).

mehr als 4 Jahre vor

Gelöst


Gamma Function
Evaluate the <http://en.wikipedia.org/wiki/Gamma_function/ Gamma Function>. Gamma_val(0) = Inf Gamma_val(1.2) = 0.9182

mehr als 4 Jahre vor

Gelöst


Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

mehr als 4 Jahre vor

Gelöst


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

mehr als 4 Jahre vor

Mehr laden