Gelöst


Function call: Kilometers to miles
Assign rateMPH with the corresponding rate in miles per hour given a user defined rateKPH, which is a rate in kilometers per hou...

etwa 10 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 10 Jahre vor

Gelöst


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

etwa 10 Jahre vor

Gelöst


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

etwa 10 Jahre vor

Gelöst


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

etwa 10 Jahre vor

Gelöst


How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

etwa 10 Jahre vor

Gelöst


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

etwa 10 Jahre vor

Gelöst


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

etwa 10 Jahre vor

Gelöst


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

etwa 10 Jahre vor

Gelöst


Fizz Buzz
Given an array of positive, non-zero, integers, return a cell array of strings the same size as the input, where each element in...

etwa 10 Jahre vor

Gelöst


Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

etwa 10 Jahre vor

Gelöst


does it touch ?
given a sentence, tell how much it touches. input : string output : how much it touches touching : a bilabial phoneme d...

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


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 10 Jahre vor

Gelöst


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

etwa 10 Jahre vor

Gelöst


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

etwa 10 Jahre vor

Gelöst


Equality check: Number of bricks
Write an if statement that assigns deliveryComplete with 1 if bricksDelivered is equal to bricksExpected.

etwa 10 Jahre vor

Gelöst


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

etwa 10 Jahre vor

Gelöst


Genetic markers test
Assign testResult with 1 if either geneticMarkerA is 1 or geneticMarkerB is 1. If geneticMarkerA and geneticMarkerB are both 1, ...

etwa 10 Jahre vor

Gelöst


reverse string
input='rama' output='amar'

etwa 10 Jahre vor

Gelöst


Matlab Basics - Set unwated parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. e.g. x = [1 2 3 4 5 6 7] --> x = [1 ...

etwa 10 Jahre vor

Gelöst


Convert letters to Greek letter
Write a switch statement that checks origLetter. If origLetter is 'a' or 'A', assign greekLetter with 'Alpha'. If origLetter is ...

etwa 10 Jahre vor

Gelöst


Create an 'arrow-head" matrix
Write a function that when given an odd number, produces an arrow-head function pointing to the right. Examples n = 3 ...

etwa 10 Jahre vor

Gelöst


Next Higher Power of B
|Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is greater than or equal to _n_. ...

etwa 10 Jahre vor

Gelöst


Tune your guitar
Given an input string with the scientific pitch notation for standard tuning ( <http://en.wikipedia.org/wiki/Guitar_tunings#Stan...

etwa 10 Jahre vor

Gelöst


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

etwa 10 Jahre vor

Gelöst


Insect population
An insect population doubles every generation. * Write a while loop that iterates numGeneration times. * Write a statment ...

etwa 10 Jahre vor

Gelöst


Check bounds
Assign inRange with 1 if userWeight is greater than 100 and less than or equal to 200.

etwa 10 Jahre vor

Mehr laden