Community Profile

Gresa Mustafa

33 total contributions since 2017

Gresa Mustafa's Badges

View details...

Contributions in
View by

Solved

Annual Salary
What is the annual salary of Mr. Cody if he works 40 hours a week and gets \$x per hour and a yearly bonus of \$2000? (Let, 50 wee...

environ 3 ans ago

Solved

Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

environ 3 ans ago

Solved

Square root of a number
Write a code that will output the square root of x.

environ 3 ans ago

Solved

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

environ 3 ans ago

Solved

Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

environ 3 ans ago

Solved

Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

environ 3 ans ago

Solved

Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

environ 3 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

environ 3 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] --> ...

environ 3 ans ago

Solved

Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

environ 3 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

environ 3 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]

environ 3 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];

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

environ 3 ans ago

Solved

ASCii Code
Using Matlab get the ASCii for '?'

environ 3 ans ago

Solved

Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

environ 3 ans ago

Solved

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

environ 3 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

environ 3 ans ago

Solved

Matlab Basics - y as a function of x
Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2

environ 3 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]

environ 3 ans ago

Solved

Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

environ 3 ans ago

Solved

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

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

environ 3 ans ago

Solved

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

environ 3 ans ago

Solved

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

environ 3 ans ago

Solved

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

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

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

environ 3 ans ago

Solved

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

environ 3 ans ago

Solved

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

environ 3 ans ago

Load more