已回答
Faster way for all possible arrangements
If you want to use native Matlab looping, but keep the benefit of flexibility (different n or k), then you can unroll the loops:...

13 years 前 | 0

已回答
Affine transformation that takes a given, known ellipse and maps it to a circle with diameter equal to the major axis.
Not difficult to do, but a bit fiddly. Exactly how difficult depends on the form of your known ellipse equation. I'm going to as...

13 years 前 | 0

已回答
remove row with matching string
If it can occur anywhere, use cellfun to test for equality: [I, ~] = find(cellfun(@(s) isequal(s, 'waiting'), myarray)); ...

13 years 前 | 0

已回答
Faster way for all possible arrangements
What you are currently doing is probably pretty close to optimal using native Matlab code. Depending on what you are doing you m...

13 years 前 | 0

已回答
computing issue
You need to decide how to represent the f_i and f - whether by functions or by vectors (the function evaluated on some mesh). ...

13 years 前 | 0

已回答
Improved Euler Method with embedded error estimate and variable time step
you could include a while loop inside your inner loop that's loosely like this: e_norm = inf; while e_norm > E_max ...

13 years 前 | 0

| 已接受

已回答
data fitting starting from a coupled system of differential equations
You're not going to be able to use a curve-fitting tool to find your parameters, you're solving an optimisation problem. Essenti...

13 years 前 | 0

| 已接受

已解决


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

13 years 前

已解决


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

13 years 前

已解决


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

13 years 前

已解决


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

13 years 前

已解决


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

13 years 前

已解决


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

13 years 前

已解决


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

13 years 前

已解决


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

13 years 前

已解决


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

13 years 前

已解决


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

13 years 前

已解决


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

13 years 前

已解决


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

13 years 前

已解决


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

13 years 前

已解决


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

13 years 前

已解决


Is my wife right?
Regardless of input, output the string 'yes'.

13 years 前

已解决


radius of a spherical planet
you just measured its surface area, that is the input.

13 years 前

已解决


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

13 years 前

已解决


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

13 years 前

已解决


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

13 years 前

已解决


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

13 years 前

已解决


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

13 years 前

已解决


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

13 years 前

已解决


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

13 years 前

加载更多