Gelöst


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

fast 11 Jahre vor

Gelöst


Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

fast 11 Jahre vor

Gelöst


Multielement indexing of a row array
The row array birthRateChina stores the China birth rate (per 1000 people) for years 2000 to 2012. Write a statement that create...

fast 11 Jahre vor

Gelöst


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

fast 11 Jahre vor

Gelöst


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

fast 11 Jahre vor

Gelöst


Lightning strike distance: Writing a function
Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

fast 11 Jahre vor

Gelöst


Pizza value using expression with parentheses
Pizza prices are typically listed by diameter, rather than the more relevant feature of area. Compute a pizza's value (cost per ...

fast 11 Jahre vor

Gelöst


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

fast 11 Jahre vor

Gelöst


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

fast 11 Jahre vor

Gelöst


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

fast 11 Jahre vor

Gelöst


Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.

fast 11 Jahre vor

Gelöst


Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

fast 11 Jahre vor

Gelöst


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

fast 11 Jahre vor

Gelöst


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

fast 11 Jahre vor

Gelöst


Hardy-Ramanujan number
Find the first Hardy-Ramanujan number.

fast 11 Jahre vor

Gelöst


Multiplying Vectors 101
Make a vector from 1 to x then multiply the sum of that vector by 2.

fast 11 Jahre vor

Gelöst


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

mehr als 12 Jahre vor

Gelöst


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

mehr als 12 Jahre vor

Gelöst


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

mehr als 12 Jahre vor

Gelöst


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

mehr als 12 Jahre vor

Gelöst


surface of a spherical planet
you just discovered its circumference, that is the input.

mehr als 12 Jahre vor

Gelöst


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

mehr als 12 Jahre vor

Gelöst


Saving MATLAB session to a file
How to save MATLAB session to a file?

mehr als 12 Jahre vor

Gelöst


Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

mehr als 12 Jahre vor

Gelöst


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

mehr als 12 Jahre vor

Gelöst


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

mehr als 12 Jahre vor

Gelöst


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

mehr als 12 Jahre vor

Gelöst


only input
Return the output without writing any code into the function.

mehr als 12 Jahre vor

Gelöst


frame of the matrix
Given the matrix M, return M without the external frame.

mehr als 12 Jahre vor

Gelöst


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

mehr als 12 Jahre vor

Mehr laden