Gelöst


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

etwa 4 Jahre vor

Gelöst


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

etwa 4 Jahre vor

Gelöst


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

etwa 4 Jahre vor

Gelöst


This is a palindrome and so am I
A palindrome is a sequence of characters which reads the same backward or forward, for instance 'a man a plan a canal panama'...

etwa 4 Jahre vor

Gelöst


Recurrence relation
A recurrence relation is given by P(1) := 1 P(n+1) := exp(1) - (n+1)*P(n) Write a function that, given an integer |...

etwa 4 Jahre vor

Gelöst


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

etwa 4 Jahre vor

Gelöst


Replace pattern 0 1 0 and 1 0 1
Find and replace a pattern in a row of zeroes and ones. * Find 1 0 1 and replace it with 1 1 1 * Find 0 1 0 and replace it w...

etwa 4 Jahre vor

Gelöst


Largest territory
Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number. ...

etwa 4 Jahre vor

Gelöst


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

etwa 4 Jahre vor

Gelöst


expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

etwa 4 Jahre vor

Gelöst


expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

etwa 4 Jahre vor

Gelöst


compress sequence into intervals
You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...

etwa 4 Jahre vor

Gelöst


Positive Infinity
Round the array a towards positive infinity

etwa 4 Jahre vor

Gelöst


Persistent Usage
This Challenge is to implement the Matlab Persistent variable capability. Given a sequence of Calls to a function return the cu...

etwa 4 Jahre vor

Gelöst


Strange Number Algorithms
Three integer numbers will be provided to you. Write a function to Step1: Multiply first number by 3. Step2: Add 6 with t...

etwa 4 Jahre vor

Gelöst


Squares inside a square!

etwa 4 Jahre vor

Gelöst


Number of paths on a grid
Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

etwa 4 Jahre vor

Gelöst


Index of a Rational number
The set of real numbers are infinite. They are so many that real numbers can't even be enumerated. However, unlike real numbers ...

etwa 4 Jahre vor

Gelöst


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

etwa 4 Jahre vor

Gelöst


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

etwa 4 Jahre vor

Gelöst


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

etwa 4 Jahre vor

Gelöst


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

etwa 4 Jahre vor

Gelöst


ASCii Code
Using matlab, give the symbol that is associated with ASCii code 122

etwa 4 Jahre vor

Gelöst


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

etwa 4 Jahre vor

Gelöst


modulus of a number
find the modulus of a given number

etwa 4 Jahre vor

Gelöst


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

etwa 4 Jahre vor

Gelöst


Create an m x n array consisting only of an input value.
Create an array with m rows and n columns wherein all entries are assigned the input value x.

etwa 4 Jahre vor

Gelöst


Find Elements in Range
Based on a question on <http://www.mathworks.com/matlabcentral/answers/ MATLAB Answers>. Find all the elements of a vector wh...

etwa 4 Jahre 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...

etwa 4 Jahre vor

Problem


Find the particular dividend
It is known that once you write the sequence 10101...101 long enough, the number will be finally divisible by any odd number if ...

etwa 4 Jahre vor | 2 | 13 Lösungsvorschläge

Mehr laden