Gelöst


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

fast 10 Jahre vor

Gelöst


Writing a while loop
Write a while loop that continues to increment userValue by 5 until userValue is less than 0.

fast 10 Jahre vor

Gelöst


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

fast 10 Jahre vor

Gelöst


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

fast 10 Jahre vor

Gelöst


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

fast 10 Jahre vor

Gelöst


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

fast 10 Jahre vor

Gelöst


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

fast 10 Jahre vor

Gelöst


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should b...

fast 10 Jahre vor

Gelöst


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

fast 10 Jahre vor

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

fast 10 Jahre vor

Gelöst


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

fast 10 Jahre vor

Gelöst


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


Bridge toll
Complete the example to calculate finalToll. The base toll for a bridge is baseToll. If the vehicle's weight is over 5,000 pound...

fast 10 Jahre vor

Gelöst


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

fast 10 Jahre vor

Gelöst


letter yes yes & letter no no
Split a string into two strings, first string has all alphabetic letters, next string has all the rest, keep the order please, o...

fast 10 Jahre vor

Gelöst


Generate pi using logarithm
Generate pi using logarithm

fast 10 Jahre vor

Gelöst


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

fast 10 Jahre vor

Gelöst


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

fast 10 Jahre vor

Gelöst


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

fast 10 Jahre vor

Gelöst


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

fast 10 Jahre vor

Gelöst


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

fast 10 Jahre vor

Gelöst


Area of rhombus
Calculate the rhombus area

fast 10 Jahre vor

Gelöst


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

fast 10 Jahre vor

Gelöst


Nearest
*Description* Find the value and index of the element in vector _x_ that is nearest to value _y_. _y_ should be able to be a ...

fast 10 Jahre vor

Gelöst


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

etwa 10 Jahre vor

Gelöst


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

etwa 10 Jahre vor

Gelöst


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

etwa 10 Jahre vor

Mehr laden