Solved

create a function that give us like the following

x=3 y= [1 -1 -1 0 1 -1 0 0 1]; -------------------------------- x=5 y= [ 1 -1 -...

4 meses ago

Problem

create a function that give us like the following

x=3 y= [1 -1 -1 0 1 -1 0 0 1]; -------------------------------- x=5 y= [ 1 -1 -...

4 meses ago | 0 | 18 solvers

Solved

Remove element(s) from cell array

You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

4 meses ago

Solved

Convert a vector into a number

This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

4 meses ago

Solved

Write a function man that takes a row vector v and returns a matrix H as follows..

Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

4 meses ago

Solved

Convert a Cell Array into an Array

Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

4 meses ago

Solved

Set some matrix elements to zero

First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

4 meses ago

Solved

Reverse the elements of an array

Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

4 meses ago

Solved

Angle between two vectors

You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

4 meses ago

Solved

Return elements unique to either input

Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

4 meses ago

Solved

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

4 meses ago

Solved

Back to basics 2 - Function Path

Covering some basic topics I haven't seen elsewhere on Cody. Given a string that is the name of a MATLAB function, return a s...

4 meses ago

Solved

Too mean-spirited

Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

4 meses ago

Solved

Calculate Inner Product

Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

4 meses ago

Solved

07 - Common functions and indexing 1

Define _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 to 100 runs ...

4 meses ago

Solved

04 - Scalar Equations 2

Define the variables a and b: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b.png>...

4 meses ago

Solved

Create a vector whose elements depend on the previous element

The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

4 meses ago

Solved

04 - Scalar Equations 3

Define the variables a, b, and c: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b....

4 meses ago

Solved

07 - Common functions and indexing 2

Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Calculate eMean as the mean across the rows of _eMat_. The an...

4 meses ago

Solved

06 - Matrix Equations 2

Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

4 meses ago

Solved

07 - Common functions and indexing 3

Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Create the variable _eMat2_, which is equal to _eMat_ with th...

4 meses ago

Solved

07 - Common functions and indexing 4

Define the matrix _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 t...

4 meses ago

Solved

02 - Vector Variables 4

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 1...

4 meses ago

Solved

Arrange vector in ascending order

Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

4 meses ago

Solved

Is the input divisible by 3?

Return true if the input is divisible by 3 and false if not.

4 meses ago

Solved

Make a 1 hot vector

Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

4 meses ago

Solved

Who invented zero?

We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

4 meses ago

Solved

Volume of a box

Given a box with a length a, width b, and height c. Solve the volume of the box.

4 meses ago