Community Profile

# Anning Smith

### USATEC/AEC/C4ISRED

46 2016 年以降の合計貢献数

#### Anning Smith's バッジ

surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

2年弱 前

Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

2年弱 前

Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

2年弱 前

Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

2年弱 前

middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

2年以上 前

A Simple Tide Gauge with MATLAB
*&#8767 &#8767 &#8767 &#8767 &#8767 &#8767 &#8767 &#8767* You are standing in a few inches of sea water on a beach. You a...

2年以上 前

Is this is a Tic Tac Toe X Win?
For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

2年以上 前

The Glass Half Full
Identical glasses are placed in a triangular tower structure, such that the top level (L = 1) comprises one glass, the next leve...

2年以上 前

Energy of a photon
*&#9883 &#9762 &#9883 &#9762 &#9883 &#9762 &#9883* Given the frequency F of a photon in giga hertz. Find energy E of this...

2年以上 前

How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

2年以上 前

Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

2年以上 前

Words Count: A Cell Array Approach
Given an input character vector consisting of words, punctuation marks, white spaces, and possibly newline characters (\n), arra...

2年以上 前

String Array Basics, Part 3: Convert Cell Array with Missing Values to String Array
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

2年以上 前

String Array Basics, Part 4: Convert String Array with Missing Values to Cell Array
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

2年以上 前

Use R2016b Text Manipulations to Fix These Addresses (Part 3)
We have a series of addresses like the following which we'd like to reformat. Each of the addresses lacks a space and a comma ...

2年以上 前

String Array Basics, Part 2: Convert String Array to Cell Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

2年以上 前

String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

2年以上 前

Use a timetable to analyze a train timetable (Part 5)
You are analyzing a train timetable (you have some time to kill since you just missed your train!) How many trains depart each d...

2年以上 前

Use a timetable to analyze a train timetable (Part 4)
You are analyzing a train timetable (you have some time to kill since you just missed your train!) What is the average daily tri...

2年以上 前

Use a timetable to analyze a train timetable (Part 3)
Oh no, you missed your train to Boston (again?)! How many times can you miss that train today? (In other words, how many Boston ...

2年以上 前

Use a timetable to analyze a train timetable (Part 2)
Oh no, you missed your train to Boston! Find the departure time of the next available train by analyzing the train timetable. Yo...

2年以上 前

Use a timetable to analyze a train timetable (Part 1)
Oh no, you missed your train to Boston! Find the departure time of the next available train by analyzing the train timetable. Th...

2年以上 前

Words Count: A String Array Approach
Given an input character vector consisting of words, punctuation marks, white spaces, and possibly newline characters (\n), arra...

2年以上 前

Use R2016b Text Manipulations to Fix These Addresses (Part 2)
We have a series of addresses like the following which we'd like to reformat. All the addresses are in the Boston area of Mass...

2年以上 前

Use R2016b Text Manipulations to Fix These Addresses (Part 1)
We have a series of addresses like the following which we'd like to reformat. Can you remove the latitude and longitude from the...

2年以上 前

Combine the first and last names
MATLAB R2016 provides a rich set of functions to work with string arrays. In this problem, you will be given two string arrays o...

2年以上 前

When Was That Goal Scored?
We want to find out when the goals were scored in a particular soccer game. For each game, we are given a "Goal Event Data" XML ...

2年以上 前

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

Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...