Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

7年以上 前

Simple problem creating a function from an abstract specification.
MYSTERYFUNCTION3 This takes a vector of numbers v and computes a vector w such the w[i] is the average of v[i] and the previous...

7年以上 前

Procrustean bed
Given a vector x and an integer n, convert x to a vector of length n by (1) chopping off the end if it is too long, or (2) addin...

7年以上 前

Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

7年以上 前

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

7年以上 前

Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

7年以上 前

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.

7年以上 前

Convolution Power
Create the convolution-power vector from initial vector _x_ and power _n_. In other words, similar to the scalar case, raising ...

7年以上 前

Determine value using Look-up table method
Given a set of 2 vectors x and y related in a certain way, you are supposed to find value of y (ydash) given a particular value ...

7年以上 前

Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

7年以上 前

Perl 3: shift
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

7年以上 前

Perl 2: pop
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

7年以上 前

Perl 1: push
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

7年以上 前

Fast Fourier transform algorithm
Your task is to implement the Fast Fourier transform algorithm, without using builtin MATLAB fft commands e.g. fft, fft2, or har...

7年以上 前

Perl 4: unshift
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

7年以上 前

Related Vectors
I have two vectors A & B. If the values in vector A is zero then the corresponding value in vector B should be zero. Example:...

7年以上 前

Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

7年以上 前

3D Surface Plotting
I have a yearly data set in separate .dat date file(eg, 100101.dat, 100102.dat,100103.....up to 101230.dat)and each contains 5 c...

7年以上 前

Beads on a Necklace (Convex Hulls)
We may describe a <http://en.wikipedia.org/wiki/Convex_hull convex hull> as a rubber band stretched around a list of points. Som...

7年以上 前

Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

7年以上 前

Edges of a n-dimensional Hypercube
Return the number of edges on an <http://en.wikipedia.org/wiki/Hypercube _n_-dimensional hypercube> (with an integer n &ge; 0). ...

7年以上 前

Net Present Value of a Stream of Cash Flows
Calculate <https://en.wikipedia.org/wiki/Present_value the net present value of a future cash flow> vector given; * future ca...

7年以上 前

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

7年以上 前

Method of Common Differences part-1
Use the method of common differences to output a vector containing the initial values and the nth order difference. ex ...

7年以上 前

Sort complex numbers into complex conjugate pairs
Sort complex numbers into complex conjugate pairs. Example: Input x = [3-6i -1-4i -1+4i 3+6i] Sorted output = [-1 - ...

7年以上 前

Cosine frequency doubler
Given an input vector containing a cosine wave of unknown frequency, produce an output vector of the same length containing a co...

7年以上 前

Numbers at bit-boundary
Find if a number is on or below the bit-boundary, as defined below. Examples 7,9 straddle the bit-boundary at 2^3 as do 31...

7年以上 前

Laguerre polynomials
Given an integer _n_ &ge; 0, generate the _n_-th <http://en.wikipedia.org/wiki/Laguerre_polynomials Laguerre polynomial>. *Ex...

7年以上 前

Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

7年以上 前

Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

7年以上 前