Gelöst


Find the position of first minimum value in an integer array with numbers
If x = [2 6 4 9 10 3 1 5 1] the the output should be 7, because the first minimum value (1) lies at the 7th position.

etwa 10 Jahre vor

Gelöst


Equidistant numbers containing certain value in an interval
Given a lower and upper bound of an interval, distance between numbers, and one particular number from that interval, create an ...

etwa 10 Jahre vor

Gelöst


Add damping to a mass spring system
Model an ideal mass-spring-damper system shown below where the spring is initially stretched. <<http://blogs.mathworks.com/im...

etwa 10 Jahre vor

Gelöst


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

etwa 10 Jahre vor

Gelöst


Infernal Recursion
Consider the recursion relation: x_n = (x_(n-1)*x_(n-2))^k Given x_1, x_2, and k, x_n can be found by this definition. Wr...

etwa 10 Jahre vor

Gelöst


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

etwa 10 Jahre vor

Gelöst


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

etwa 10 Jahre vor

Gelöst


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

etwa 10 Jahre vor

Gelöst


Create a matrix X, where each column is a shifted copy of the vector v
Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

etwa 10 Jahre vor

Gelöst


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

etwa 10 Jahre vor

Gelöst


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

etwa 10 Jahre vor

Gelöst


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

etwa 10 Jahre vor

Gelöst


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

etwa 10 Jahre vor

Gelöst


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

etwa 10 Jahre vor

Gelöst


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

etwa 10 Jahre vor

Gelöst


wait for me
wait exactly x seconds please, need not be more than 2 seconds but must be accurate within say 50 milliseconds, your function mu...

etwa 10 Jahre vor

Gelöst


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

etwa 10 Jahre vor

Gelöst


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

etwa 10 Jahre vor

Gelöst


Create One Large Eye of size N x N Quickly?
*<http://en.wikipedia.org/wiki/Aye_(yes) Aye !!!>*

etwa 10 Jahre vor

Gelöst


Comparing floating point values
* Assign matchFound with true if firstSample and secondSample are less than thresholdValue.

etwa 10 Jahre vor

Gelöst


Generate a Parasitic Number
This problem is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/156-parasitic-numbers Problem 156>. ...

etwa 10 Jahre vor

Gelöst


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

etwa 10 Jahre vor

Gelöst


nth Rational Number
Return the nth rational number. This is the inverse to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1471 1...

etwa 10 Jahre vor

Gelöst


Polygonal numbers
The task of <http://www.mathworks.co.uk/matlabcentral/cody/problems/5 Problem 5> is to calculate triangular numbers. By playing ...

etwa 10 Jahre vor

Gelöst


Find vampire numbers
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

etwa 10 Jahre vor

Gelöst


Convert hex color specification to MATLAB RGB
Here's something that comes up all the time if you deal with web pages. Given a <http://www.w3schools.com/html/html_colors.as...

etwa 10 Jahre vor

Gelöst


Polite numbers. Politeness.
A polite number is an integer that sums of two or more consecutive positive integers. Politeness of a positive integer is a num...

etwa 10 Jahre vor

Gelöst


Bell Number calculator
Calculate a vector of Bell numbers for sets up to length n. Bell numbers are the maximum number of partitions of a set. See the ...

etwa 10 Jahre vor

Gelöst


N-th Odious
Given index n return n-th <https://oeis.org/A000069 odious number>.

etwa 10 Jahre vor

Gelöst


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

etwa 10 Jahre vor

Mehr laden