A résolu


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2 3 3 3 4...

plus d'un an il y a

A résolu


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

plus d'un an il y a

A résolu


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

plus d'un an il y a

A résolu


Return area of square
Side of square=input=a Area=output=b

plus d'un an il y a

A résolu


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

plus d'un an il y a

A résolu


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

plus d'un an il y a

A résolu


Add two numbers
Given a and b, return the sum a+b in c.

plus d'un an il y a

A résolu


Draw the symbol '+'
Draw '+' in an x-by-x matrix (where x is odd and x >3) Example: x = 5 y = [0 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 ...

plus d'un an il y a

A résolu


Energy Conversion 2

plus d'un an il y a

A résolu


Energy Conversion 1

plus d'un an il y a

A résolu


Velocity Conversion
Given a velocity in mph, convert it to km/h. Round the answer to the fourth decimal place.

plus d'un an il y a

A résolu


Area Conversion 2

plus d'un an il y a

A résolu


Area Conversion 1

plus d'un an il y a

A résolu


Mass Conversion 2

plus d'un an il y a

A résolu


Mass Conversion 1

plus d'un an il y a

A résolu


Temperature Conversion 3

plus d'un an il y a

A résolu


Temperature Conversion 2

plus d'un an il y a

A résolu


Draw a '6' in a zero matrix!

plus d'un an il y a

A résolu


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

plus d'un an il y a

A résolu


Possible Outcomes of American Roulette
The payout for American roulette can be calculated by: payout = (38/n)-1 where n is the number of squares the bet covers. ...

plus d'un an il y a

A résolu


NCHOOSEK - Time Optimization
*Input* * *V* —— Set of all choices, a vector of N, 1 < N < 100 * *K* —— Number of selected choices, a scalar, 0 <= K <=...

plus d'un an il y a

A résolu


Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

plus d'un an il y a

A résolu


Find Logic 9

plus d'un an il y a

A résolu


An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:* Many important observations in math and science can be described by short, but powerful, equations...

plus d'un an il y a

A résolu


Temperature Conversion 1

plus d'un an il y a

A résolu


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

plus d'un an il y a