I work on the MATLAB Central and MATLAB Interface teams. See also http://www.starchamber.com/

Solved

Longest Sequence of NaNs

In an array return the length of longest sequence of nans for each column. x = [ 2 3 1 2 5 6; nan nan 5 n...

environ 6 heures ago

Published

MATLAB Drive and British Coal

The other day I received this email from my friend Jos. Very thoughtful of him! After a recent meeting, we were discussing...

environ un mois ago

Published

Virtual Workshops with Black Girls Code and MissionSAFE

Guest bloggers Ishaani, a MathWorks UX Specialist, and Vidya Gopalakrishnan, a MathWorks Senior Technical Writer, bring you...

environ 2 mois ago

Published

How Long Is a Winter’s Day?

Happy December! The days sure seem longer in the winter. Of course, there are fewer hours of daylight. But the actual span...

3 mois ago

Solved

Fix the last element of a cell array

Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

3 mois ago

Solved

Convert a numerical matrix into a cell array of strings

Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

3 mois ago

Solved

Proper Factors

Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

3 mois ago

Solved

QWERTY coordinates

Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

3 mois ago

Solved

QWERTY Shift Code Decoder

Decode a string encoded using the QWERTY shift code. QWERTY shift code is where the message was touch typed but with an offse...

3 mois ago

Solved

Word Distance - Sum

Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...

3 mois ago

Solved

Count letters occurence in text, specific to words with a given length.

Build a function with two input arguments: a string and a word length (number of letters), that outputs a vector of counts of th...

3 mois ago

Solved

Data decompression

A chunk of data is to be 'decompressed'. Input: * compressed: a row vector of uint8 values. This is the compressed data. ...

3 mois ago

Solved

Alphabetize by last name

Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

3 mois ago

Published

Savitha Talks About Kubernetes

I’m happy this week to be talking to a fellow MathWorker: Savitha Raghunathan. Why, you may ask, should I use the MATLAB...

4 mois ago

Solved

Elements with highest local average

Input v is a row vector such that length(v)>3. Consider a sliding window of length 3 that is used to calculate the local average...

4 mois ago

Solved

Combine Data With Gaps

Combine data sets a and b where the datasets have "gaps" or unique points. Example: Input a = [1,0; 2,1; ...

4 mois ago

Solved

Split array into pieces according to corresponding array

An array x of length n has values 1...m with each value appearing at least once. The values are sorted (n>=m). A second...

4 mois ago

Solved

Sum my indices

Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

4 mois ago

Solved

Find indices of diagonal elements

Given a matrix A and a diagonal index d (where 0 indicates the main diagonal and off-diagonals are identified by positive and n...

4 mois ago

Solved

Hard limit function

Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

4 mois ago

Solved

How close to a hole

Suppose you have a description of good places (ones) and bad places (zeros). You want to know your distance from a bad place (in...

4 mois ago

Solved

Find the distance between runs

Another question inspired by the <http://uk.mathworks.com/matlabcentral/answers/?s_tid=gn_mlc_an answers forum>: A vector of ...

4 mois ago

Published

New Cody Contest Underway

Because of the amazing contributions from community members like you, Cody has lots and lots of interesting problems to...

5 mois ago

Solved

Project Euler: Problem 5, Smallest multiple

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

6 mois ago

Published

Images in Cody Problems

Today I get to tell you about a feature I’ve been lusting after for years: proper rich text in Cody with embedded images....

6 mois ago

Published

Double Your Pleasure – Fun with Shifty Digits

You’re in for a guest-blogging treat today. But first… What is the relationship between the number 1947 and 7194? Look...

6 mois ago

Published

Cody Problem Visualization, Revisited

Way back in 2013 I did a blog post about visualizing Cody problems. The idea was to take various metrics for each problem...

7 mois ago

Published

Chan Zuckerberg Initiative Funding Open for MATLAB Community Toolboxes

Today’s post is a guest entry from Vijay Iyer, Neuroscience Community Liaison at MathWorks. MATLAB users in research have a...

8 mois ago

Published

MathWorks Documentation has a fresh look: Check out our new Help Center

You may have noticed that MATLAB Online Documentation now sports a different UI. For this post, I’d like to welcome Wendy...

9 mois ago