Gelöst


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

12 Monate vor

Gelöst


Weave two vectors into one
Weave the two given vectors into one as shown below. Example: If a = [1 1 1] b = [0 0 0] then y = [1 0 1 0 ...

12 Monate vor

Gelöst


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

12 Monate vor

Gelöst


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

12 Monate vor

Gelöst


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

12 Monate vor

Gelöst


Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

12 Monate vor

Gelöst


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

12 Monate vor

Gelöst


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

12 Monate vor

Gelöst


Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

12 Monate vor

Gelöst


Get the elements of diagonal and antidiagonal for any m-by-n matrix
In the problem <http://www.mathworks.com/matlabcentral/cody/problems/858-permute-diagonal-and-antidiagonal Problem 858. Permute ...

12 Monate vor

Gelöst


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

12 Monate vor

Gelöst


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

12 Monate vor

Gelöst


Sum My Indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

12 Monate vor

Gelöst


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

12 Monate vor

Gelöst


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

12 Monate 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

12 Monate vor

Gelöst


Converter temp 0 to 200 degree C to 4 to 20mA
Converter temp 0 to 200 degree C to 4 to 20mA (It is used in transmitter)

12 Monate vor

Gelöst


Vector Multiplication
Vector Multiplication of three matrix as shown in test cases.

12 Monate vor

Gelöst


Find out Harmonic mean.
Find out Harmonic mean.

12 Monate vor

Gelöst


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

12 Monate vor

Gelöst


Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

12 Monate vor

Gelöst


Create Vector containing following elements
Create Vector containing following elements A=[pi eps NaN inf -inf flintmax];

12 Monate vor

Gelöst


Find out the Gray Code for a Given Binary Number
Find out <http://en.wikipedia.org/wiki/Gray_code Gray Code> for a given binary number Example Binary input 1000 Gray ...

12 Monate vor

Gelöst


Find and replaces spaces from a input string with *
For a given input string str, find how many spaces are there in the string and replace those spaces with * e.g. str = 'this is ...

12 Monate vor

Gelöst


Find the sum of n squares
What is the sum of the squares of the first n integers?

12 Monate vor

Gelöst


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

12 Monate vor

Gelöst


Append two matrix as shown below example
Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

12 Monate vor

Gelöst


Find out value of polynomial at different value.
Find out value of polynomial at different value. Example p(s) = s + 8 For s=0, value is 8.

12 Monate vor

Gelöst


Solve Linear equations
Solve Linear equations Example: x+y=2 and x+2y=3, then x and y equal to 1.

12 Monate vor

Gelöst


Delete 2nd and 5th column of Given 6*6 matrix
Delete the 2nd and 5th columns of the given 6*6 matrix. Example Suppose A = magic(6) 35 1 6 26 19 ...

12 Monate vor

Mehr laden