Risolto


Sum of Squares
Given a vector v of length n, write a MATLAB function to calculate the sum of the squares of its elements.

circa 2 anni fa

Risolto


findPositiveEvenNumbers
Write a MATLAB function findPositiveEvenNumbers that takes an array of integers as input and returns a new array containing only...

circa 2 anni fa

Risolto


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

circa 2 anni fa

Risolto


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

circa 2 anni fa

Risolto


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

circa 2 anni fa

Risolto


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

circa 2 anni fa

Risolto


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

circa 2 anni fa

Risolto


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

circa 2 anni fa

Risolto


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

circa 2 anni fa

Risolto


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

circa 2 anni fa

Risolto


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.

circa 2 anni fa

Risolto


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

circa 2 anni fa

Risolto


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

circa 2 anni fa

Risolto


Square a Number
Given an input x, return y, which is equal to the square of x.

circa 2 anni fa

Risolto


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

circa 2 anni fa

Risolto


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

circa 2 anni fa

Risolto


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

circa 2 anni fa

Risolto


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

circa 2 anni fa

Risolto


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

circa 2 anni fa

Risolto


Find The area of the square
Given that the length of the side of a square is x, find the area.

circa 2 anni fa

Risolto


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

circa 2 anni fa

Risolto


find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R) for example I=5,h=4 then the ans R=3;

circa 2 anni fa

Risolto


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

oltre 2 anni fa

Risolto


Slope intercept application
Find y given slope (m), x, and y intercept (b).

oltre 2 anni fa

Risolto


Function substitution (2)
Evaluate the function for the given values of the variables N and t

oltre 2 anni fa

Risolto


Function substitution (1)
Evaluate the function for the given values of the variables N and t

oltre 2 anni fa

Risolto


Array Concatenation (2)
Given two matrices, a and b, concatenate the two matrices vertically, i.e., the number of rows of the result should be equal to ...

oltre 2 anni fa

Risolto


Array Concatenation (1)
Given two matrices, a and b, concatenate the two matrices horizontally, i.e., the number of columns of the result should be equa...

oltre 2 anni fa

Risolto


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

oltre 2 anni fa

Risolto


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

oltre 2 anni fa

Carica altro