解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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

3年弱 前

解決済み


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年弱 前

解決済み


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

3年弱 前

解決済み


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年弱 前

解決済み


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

3年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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

3年弱 前

解決済み


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]

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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;

3年弱 前

解決済み


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.

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

さらに読み込む