解決済み


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

11年以上 前

解決済み


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

11年以上 前

解決済み


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

11年以上 前

解決済み


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

11年以上 前

解決済み


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

11年以上 前

解決済み


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

11年以上 前

解決済み


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

11年以上 前

解決済み


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

11年以上 前

解決済み


Positive Infinity
Round the array a towards positive infinity

11年以上 前

解決済み


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

11年以上 前

解決済み


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

11年以上 前

解決済み


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

11年以上 前

解決済み


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

11年以上 前

解決済み


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

11年以上 前

解決済み


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

11年以上 前

解決済み


Complex number
For complex number c=a+bi, write code that will add a and b together.

11年以上 前

解決済み


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

11年以上 前

解決済み


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

11年以上 前

解決済み


Negative matrix
Change the sign of all elements in given matrix.

11年以上 前

解決済み


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

11年以上 前

解決済み


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

11年以上 前

解決済み


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

11年以上 前

解決済み


select the primes of a vector
Find the prime numbers in a vector

11年以上 前

解決済み


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

11年以上 前

解決済み


Rounding
Round 10.67 and make 'y' equal to that number.

11年以上 前

解決済み


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

11年以上 前

解決済み


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

11年以上 前

解決済み


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

11年以上 前

解決済み


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

11年以上 前

解決済み


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

11年以上 前

さらに読み込む