Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


Summy's odd sum

circa 3 anni fa

Risolto


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]

circa 3 anni fa

Risolto


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]

circa 3 anni fa

Risolto


Sort in descending order.

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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]

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 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 3 anni fa

Risolto


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

circa 3 anni fa

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 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


Matrix multiplication
Multiply two incoming matrices via matrix multiplication

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Carica altro