已解决


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

15 years 前

已回答
Separating the channels of a .wav sound file
If the .wav file is a stereo audio file, then <http://www.mathworks.com/help/techdoc/ref/wavread.html |wavread|> can read them i...

15 years 前 | 1

| 已接受

已回答
Memory
That's the theoretical limit that MATLAB can access on your 64-bit system, which is independent of how much RAM and Swap you hav...

15 years 前 | 1

已解决


Clean the List of Names
Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

15 years 前

已解决


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

15 years 前

已解决


Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

15 years 前

已解决


Renaming a field in a structure array
MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

15 years 前

已解决


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

15 years 前

已回答
Last non nan observation
I'm not sure if you're looking for the indices (row number) or the actual value of the last non nan observation. So here are bot...

15 years 前 | 4

| 已接受

已回答
Why use x=load('myFile.mat')?
You may actually get an incorrect answer in certain situations. For example, create a MAT file, myFile.mat, that has a variab...

15 years 前 | 5

| 已接受

已发布


Looking Back: 2011 in Review
Having recently wrapped up another great year for the File Exchange (a year in which we saw the number of...

15 years 前

Thumbnail

已回答
Coloring scatterplots based on frequency of point occurrence in input
*EDIT: |unique| instead of |sort|* You should be able to do it with: |unique| (use the 'rows' parameter) |hist| (use th...

15 years 前 | 4

| 已接受

已发布


Finding the best distribution that fits the data
Jiro's pick this week is allfitdist by Mike Sheppard. As an application engineer, I go out and deliver...

15 years 前

Thumbnail

已回答
Plot using scatter3 function.
Is this what you're looking for? x = rand(1,24); y = rand(1,24); z = rand(1,24); sz = 40; colors = jet(24); ...

15 years 前 | 1

已解决


Return the 'Size' of a String of Code
One of the most 'mysterious' parts of playing Cody is the sizing system. Given a string of commands, return the size that Cody w...

15 years 前

已发布


Units Conversion Toolbox
Brett's Pick this week is Units Conversion Toolbox, by John McDermid. Once, a long time ago, I was a real...

15 years 前

Thumbnail

已解决


wait for me
wait exactly x seconds please, need not be more than 2 seconds but must be accurate within say 50 milliseconds, your function mu...

15 years 前

已解决


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

15 years 前

已发布


A non-engineer tinkers with Simulink
Greg's pick this week is A non-engineer tinkers with Simulink by Dimitri Shvorob. Contents ...

15 years 前

Thumbnail

已解决


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

15 years 前

已解决


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

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

15 years 前

已解决


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

15 years 前

已解决


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

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

15 years 前

已解决


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

15 years 前

已解决


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

15 years 前

已解决


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

15 years 前

已解决


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

15 years 前

已解决


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

15 years 前

加载更多