Resuelto


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]

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


Make a Plot with Functions
Make a plot and test

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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.

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Resuelto


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

más de 1 año hace

Cargar más