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 11 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]

fast 11 Jahre vor

Gelöst


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

fast 11 Jahre vor

Gelöst


length of a vector
Find twice the length of a given vector.

fast 11 Jahre vor

Gelöst


Complex number
For complex number c=a+bi, write code that will add a and b together.

fast 11 Jahre vor

Gelöst


Rounding
Round 10.67 and make 'y' equal to that number.

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor