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

11 months ago

Published

Circles All the Way Down

This is a story about how ideas and code bounce around our shared social spaces. This one went from Twitter to GitHub to...

11 months ago

Solved

Ordinal numbers

Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

12 months ago

Solved

Split a string into chunks of specified length

Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

12 months ago

Solved

Cell Counting: How Many Draws?

You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

12 months ago

Solved

Guess Cipher

Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifm...

12 months ago

Submitted

Private Cody Leaderboard

This code creates a private leaderboard for Cody players.

12 months ago | 2 downloads |

Solved

Successive zeros

Suppose n is the number of digits a number contains. Now, 12032 - is a valid n=5 digit number. But 10023 - is defined as i...

1 year ago

Solved

Create a vector of n alternating ones and zeros

Given n, your output should be a vector y of numbers such that the first number is 1 and the numbers following it alternate betw...

1 year ago

Solved

Find Elements in Range

Based on a question on <http://www.mathworks.com/matlabcentral/answers/ MATLAB Answers>. Find all the elements of a vector wh...

1 year ago

Solved

Pancake sorting

Sort a stack of pancakes by flipping them using spatula. * There are _N_ pancakes with diameters _1:N_. * Spatula can be ins...

1 year ago

Published

Community Q&A – Kalyan Acharjya

Kalyan Acharjya has been contributing to MATLAB Answers since 2017. This past year his participation skyrocketed and he is...

1 year ago

Published

Stay Connected using MATLAB and Simulink

Due to the global COVID-19 pandemic, engineers and scientists are finding themselves suddenly working from home or other...

1 year ago

Published

New Decade, New MATLAB Mobile

You may have noticed that MATLAB Mobile now sports a different UI. For this post, I’d like to welcome Geeta Sonigra, our...

1 year ago

Published

Nor’easters and Wind Roses

Where I live, in the northeast part of the United States, we have a special storm that goes by the name “nor’easter”. Do we...

1 year ago

Published

Visualizing Square Roots with Elias Wegert

Quick, what’s the square root of -1? Okay, I know. That’s an easy one. But how about the square root of i? If it’s been a...

1 year ago

Published

Leap Days on Mars

February 29th is right around the corner. It’s been hibernating for the past three years, snuggling in its secret den...

1 year ago

Published

Head Over Heels in Love

This is what happens when two logarithmic spirals love each other very much. % Vary k from 1.5 to 3.5 k = 1.5; t =...

1 year ago

Published

Community Q&A – Kelly Kearney

Kelly Kearney is a top contributor to MATLAB Answers and File Exchange. Here is a Q&A I did with Kelly who is a...

1 year ago

Published

Rayner, BAE Systems, and Cody

This week we’re very fortunate to speak with Rayner Saggers. Rayner is a Senior Systems Engineer on the F-35 Program at BAE...

1 year ago

Solved

Summing Rows and Columns

Create a matrix y of size (n+1) whose last column's elements are the summation of the elements of all the other columns and last...

1 year ago

Published

Crepuscular Calculations

Happy Crepusculus! Never heard of Crepusculus? I’ll come back to that later. Instead, let me begin with a fun fact: the...

1 year ago

Published

A GitHub Badge for the File Exchange

Only last month I was talking about badges on the File Exchange. Today I’m going to tell you about another kind of badge:...

1 year ago

Solved

Calculate days until Christmas

Provided with inputs year, month, day e.g. 2019,11,12, calculate the number of days until the next Christmas day, i.e. the next ...

1 year ago

Published

A Frightful Error

It’s late October. The nights are getting longer (for us North Americans, anyway), and vampire processes are sucking the...

1 year ago

Published

Acquire Images from Your Device Camera with MATLAB Mobile

Bringing Your Images and MATLAB Mobile Closer Together In our last blog post, we started laying out our first phase of...

1 year ago

Solved

Find nth maximum

Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

1 year ago

Published

New! Badges on the File Exchange

Chad Greene has contributed 171 files (and counting) to the File Exchange. The man is a File Exchange legend. But you know...

1 year ago

Solved

Create a "+" flag

Given two odd numbers, [m, n], return a matrix of size m x n which has all elements of the centre column and centre row set as 1...

1 year ago

Published

Mathematical Visualization with Plywood and Power Tools

This is Hollis Potter (he’s the one on the right). He works on the Community team here at MathWorks. On the table next to...

1 year ago