解決済み


find the nth fibonacci number
The Fibonacci sequence is defined as follows: give n, find the nth fibonacci number

24日 前

解決済み


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

25日 前

解決済み


Find the nth composite number.
Everyone heard about the nth prime number. Let's try to find out the nth composite. For example , 1 is the first composite, 10 i...

25日 前

解決済み


Converts numbers into characters
Converts numbers into characters

26日 前

解決済み


Find the index of nth maximum of a row vector of real numbers
Given a vector of real numbers x, find the index idx of _n_ th maximum value. If nth maximum occurs more than once, return the i...

26日 前

解決済み


Decimal Comparison
*Background* A utility of particular interest to Cody and other MATLAB ventures is comparing the equality of two numbers. In ...

26日 前

解決済み


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

26日 前

解決済み


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

27日 前

解決済み


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

28日 前

解決済み


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

28日 前

解決済み


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

29日 前

解決済み


Square root of a number
Write a code that will output the square root of x.

29日 前

解決済み


Create nXn Fourier matrix

30日 前

解決済み


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

30日 前

解決済み


Max of a Vector
Write a function to return the max of a vector

30日 前

解決済み


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

30日 前

解決済み


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

30日 前

解決済み


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

約1ヶ月 前

解決済み


Finding fourier transform of a given vector
Find the fourier transform of a given input vector for ex a=[1 2 3 4] then y=[ 10.0000 + 0.0000i -2.0000 +...

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

約1ヶ月 前

解決済み


Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

約1ヶ月 前

解決済み


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

約1ヶ月 前

解決済み


Flipping a Matrix
Flipping matrix up and down. If a central row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...

約1ヶ月 前

解決済み


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

約1ヶ月 前

解決済み


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

約1ヶ月 前

解決済み


Swap between columns
The idea is to swap between second and second last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

約1ヶ月 前

解決済み


Remove a specific character with another
Remove any (-) dash sign with (_) underscore Ex = 'The-Journey-of-thoudsands-miles-starts-with-a-single-step' y = 'The_Jour...

約1ヶ月 前

解決済み


Swap between first and last
The idea is to swap between first and last row Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

約1ヶ月 前

解決済み


Swap between first and last column
The idea is to swap between first and last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 ...

約1ヶ月 前

さらに読み込む