解決済み


Calculate the mean of each half of a matrix
Given a matrix with an even number of columns, n, return a 1-by-2 row vector where the first element is the mean of all the elem...

3年弱 前

解決済み


My Problem, Find the square of the horizontal concatenation of the third and fifth elements of a vector.
given the 1x5 vector x, y must be the square of the horizontal concatenation of the third and fifth elements. So, if x = [1 1 1 ...

3年弱 前

解決済み


Summy's odd sum

3年弱 前

解決済み


Vertically stack two vectors
Stack two vectors on top of each-other so that... if A = [1 5 3] and B = [8 6 4] then C = [1 5 3 ; 8 6 4]

3年弱 前

解決済み


Shift elements of vector left
Shift elements of vector to the left. For ex. : Input_vec = [1 2 3 4 5] Output_vec = [2 3 4 5 1]

3年弱 前

解決済み


Sort in descending order.

3年弱 前

解決済み


Set x value to each odd index of vector y.
Set x value to each odd index of vector y.

3年弱 前

解決済み


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

3年弱 前

解決済み


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

3年弱 前

解決済み


Delete x value in given vector y.
Delete x value in given vector y. Exapmle x=5; y=[ 1 2 5 6 74 5 2 5] result=[1 2 6 74 2]

3年弱 前

解決済み


Find sum of alternate numbers in a vector
Find sum of alternate numbers in a vector starting from index 1

3年弱 前

解決済み


07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

3年弱 前

解決済み


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

3年弱 前

解決済み


Calculating the total earnings of a factory
The row vector, prods contains the number of various products manufactured per hour. The second row vector, prices holds values ...

3年弱 前

解決済み


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

3年弱 前

解決済み


Create an array (n,n) where only diagonal elements are '1' and others are '0'
Create an array (n,n) where only diagonal elements are '1' and others are '0' EX: n = 3; then Resultant array would be [ 1 0...

3年弱 前

解決済み


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

3年弱 前

解決済み


Unique - Very Very Large Numbers
Given a vector column, with some very large numbers, create the ascending sort and unique vector. *Input:* A (column vector)...

3年弱 前

解決済み


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

解決済み


Independent direction vectors of a plane
Given the equation of a plan of the form ax+by+cz=d, return 2 independent direction vectors which could e.g. be used to determin...

3年弱 前

解決済み


Find all prime factors of the input
Given an input x, find its all prime factors. Return the vector with all factors in ascending order. Efficiency is the key here...

3年弱 前

解決済み


Implement zero-based indexing for Matrices
Given an input vector and position (which is zero based) output the value Example: x = [1 2; 4 5] pos = [0 1] value = 5 ...

3年弱 前

解決済み


Find the minimal value in N*N Matrix
Suppose that we have N by N matrix, we try to find the minimal value in that matrix. examples: Input A=[1 2 3 5 6;52 58 56 45...

3年弱 前

解決済み


Create an arrow matrix
An arrow matrix is a square matrix that contains ones on the diagonal, the last column, and last row. ...

3年弱 前

解決済み


Building matrices
If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

3年弱 前

解決済み


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

3年弱 前

解決済み


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

3年弱 前

解決済み


Matrix multiplication
Multiply two incoming matrices via matrix multiplication

3年弱 前

解決済み


Basic matrix operations using standard MATLAB commands
Create the matrix: 1.0e+15 * 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000...

3年弱 前

解決済み


Eye Squared
For a positive integer |n| create the identity matrix with |n| elements. In case it is not possible to produce an identity ma...

3年弱 前

さらに読み込む