已解决


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]

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


Make a Plot with Functions
Make a plot and test

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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.

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

加载更多