Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

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

casi 15 años hace | 4

| aceptada

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

casi 15 años hace | 5

| aceptada

Publicado


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

casi 15 años hace

Thumbnail

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

casi 15 años hace | 4

| aceptada

Publicado


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

casi 15 años hace

Thumbnail

Respondida
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); ...

casi 15 años hace | 1

Resuelto


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

casi 15 años hace

Publicado


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

casi 15 años hace

Thumbnail

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Publicado


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

casi 15 años hace

Thumbnail

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


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

casi 15 años hace

Resuelto


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

casi 15 años hace

Cargar más