Solved

Double colon operator: Increment by x

* Construct a row array countValues from 0 to 25, elements incremented by incrementValue. Ex: If incrementValue is 5, countVa...

presque 4 ans ago

Solved

Add two numbers

Calculate the sum of two numbers. Example input = [2 3] output = 5

presque 4 ans ago

Solved

Calculate the derivative of a polynomial

Example: in = [ 1 1 1 ] out = [ 2 1 ]

presque 4 ans ago

Solved

Matlab Basics II - Create a vector with a repeated entry

Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

presque 4 ans ago

Solved

Matlab Basics II - Velocity of a particle

A particle is moving in space, such that it's velocity is given by: <<http://s30.postimg.org/5rf1xtvj5/cody1.png>> write a...

presque 4 ans ago

Solved

Matlab Basics II - squares

Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

presque 4 ans ago

Solved

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

presque 4 ans ago

Solved

Matlab Basics - Logical Tests I

Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

presque 4 ans ago

Solved

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

presque 4 ans ago

Solved

Matlab Basics - Set unwanted 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. Example x = [1 2 3 4 5 6 7] --> ...

presque 4 ans ago

Solved

Matlab Basics II - Minimum

Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

presque 4 ans ago

Solved

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

presque 4 ans ago

Solved

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]

presque 4 ans ago

Solved

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

presque 4 ans ago

Solved

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]

presque 4 ans ago

Solved

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

presque 4 ans ago

Solved

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

presque 4 ans ago

Solved

Matlab Basics - Rounding I

Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

presque 4 ans ago

Solved

ASCii Code

Using matlab, give the symbol that is associated with ASCii code 122

presque 4 ans ago

Solved

Matlab Basics - Sum a vector

Write a script to add up all the elements in a vector e.g. x = [1 2 3 4] --> output = 10

presque 4 ans ago

Solved

Counting down

Create a vector that counts from 450 to 200 in increments of 10.

presque 4 ans ago

Solved

Deleting an element in a matrix

For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

presque 4 ans ago

Solved

Vectors counting by 2

Create a vector numbers from 7 to 15 in increments of 2

presque 4 ans ago

Solved

Flipping

Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

presque 4 ans ago

Solved

Squaring Matrix

Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

presque 4 ans ago

Solved

Remainder

Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

presque 4 ans ago