解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


Add two numbers
Add two numbers (For beginners)

11年以上 前

解決済み


02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

11年以上 前

解決済み


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

11年以上 前

解決済み


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

11年以上 前

解決済み


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

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年以上 前

解決済み


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

11年以上 前

解決済み


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

11年以上 前

解決済み


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

11年以上 前

解決済み


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

11年以上 前

解決済み


03 - Matrix Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

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年以上 前

解決済み


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

11年以上 前

解決済み


DC chopper
Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

12年弱 前

解決済み


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

12年弱 前

解決済み


Will there be a new leader?
Simply answer the title.

12年弱 前

解決済み


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

12年弱 前

解決済み


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

12年弱 前

解決済み


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

12年弱 前

解決済み


Triangle Numbers Below N
This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...

12年弱 前

解決済み


Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

12年弱 前

解決済み


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

12年弱 前

解決済み


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

12年弱 前

解決済み


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

12年弱 前

解決済み


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

12年弱 前

解決済み


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

12年弱 前

解決済み


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

12年弱 前

さらに読み込む