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]

3 years ago

Solved


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

3 years ago

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

3 years ago

Solved


Can the given sides form a triangle?
Can the three given sides form a triangle?

3 years ago

Solved


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

3 years ago

Solved


Compound Interest: Interest Rate
Theorem : Compound Interest where, F : Future value at the end of n periods P : Present value r : Annual nominal rate n :...

3 years ago

Solved


Make a Plot with Functions
Make a plot and test

3 years ago

Solved


Plotting Practice
Plot cos(x) vs x as shown in the figure below. Include the appropriate title, x-label, and y-label. Note, it is case sensitive. ...

3 years ago

Solved


Find the remainder - 02
Given an array of integers, find the remainder when the summation of all the elements is divided by N

3 years ago

Solved


Determine the square root
Determine the square root of the value the user has entered, n.

3 years ago

Solved


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

3 years ago

Solved


Return the first and last characters of a character array
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

3 years ago

Solved


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

3 years ago

Solved


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

3 years ago

Solved


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

3 years ago

Solved


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

3 years ago

Solved


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

3 years ago

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

3 years ago

Solved


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

3 years ago

Solved


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

3 years ago

Solved


Momentum Calculation
A shopping cart of mass 'm1' is traveling with velocity 'u' and collides with a second shopping cart of mass 'm2.' The two shopp...

3 years ago

Solved


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

3 years ago

Solved


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

3 years ago

Solved


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

3 years ago

Solved


y equals x divided by 2
function y = x/2

3 years ago

Solved


Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

3 years ago

Solved


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

3 years ago

Solved


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

3 years ago

Solved


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

3 years ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

3 years ago

Load more