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]

casi 4 años 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]; ...

casi 4 años 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 ...

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años 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 :...

casi 4 años hace

Resuelto


Make a Plot with Functions
Make a plot and test

casi 4 años 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. ...

casi 4 años 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

casi 4 años hace

Resuelto


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

casi 4 años 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...

casi 4 años 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...

casi 4 años 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...

casi 4 años 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....

casi 4 años 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.

casi 4 años hace

Resuelto


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

casi 4 años 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...

casi 4 años 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...

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años 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...

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años 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...

casi 4 años 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 ...

casi 4 años 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 ...

casi 4 años 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...

casi 4 años hace

Resuelto


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

casi 4 años hace

Cargar más