Solved

Find the peak 3n+1 sequence value

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

nästan 7 år ago

Solved

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

nästan 7 år ago

Solved

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

nästan 7 år 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 ...

nästan 7 år ago

Solved

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

nästan 7 år ago

Solved

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

nästan 7 år ago

Solved

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

nästan 7 år ago

Solved

Counting Sequence

Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

nästan 7 år ago

Solved

Implement a ROT13 cipher

Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...

nästan 7 år ago

Solved

Scrabble Scores

Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provi...

nästan 7 år ago

Solved

Interpolator

You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

nästan 7 år ago

Solved

Test for balanced parentheses

Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

nästan 7 år ago

Solved

Maximum running product for a string of numbers

Given a string s representing a list of numbers, find the five consecutive numbers that multiply to form the largest number. Spe...

nästan 7 år ago

Solved

Duplicates

Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

nästan 7 år ago

Solved

The Goldbach Conjecture, Part 2

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

nästan 7 år ago

Solved

Function Iterator

Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

nästan 7 år 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...

nästan 7 år ago

Solved

Indexed Probability Table

This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

nästan 7 år ago

Solved

Find the two most distant points

Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

nästan 7 år ago

Answered

"Standalone Named User” license question

Speak to Mathworks support regarding the standalone named user license. They can convert it to a network named user license, whi...

"Standalone Named User” license question

Speak to Mathworks support regarding the standalone named user license. They can convert it to a network named user license, whi...

nästan 7 år ago | 1

| accepted

Answered

How to plot/use numerous values in single cell?

Brian, This example should be a good starting point. % Setting up some test data x = rand(40,3); data = cell(3,800...

How to plot/use numerous values in single cell?

Brian, This example should be a good starting point. % Setting up some test data x = rand(40,3); data = cell(3,800...

nästan 7 år ago | 0

| accepted

Answered

How do I make a MATLAB created table properly appear in EXCEL?

Brad, Each row of Make is a collection of strings that cannot be concatenated automagically. You can concatenate the strin...

How do I make a MATLAB created table properly appear in EXCEL?

Brad, Each row of Make is a collection of strings that cannot be concatenated automagically. You can concatenate the strin...

nästan 7 år ago | 1

| accepted

Answered

How to save table in workspace as txt/.m file in matlab ?

You can use *writetable* to write to a text file. writetable(data,'outputfile.txt'); If you really need this to be a .m ...

How to save table in workspace as txt/.m file in matlab ?

You can use *writetable* to write to a text file. writetable(data,'outputfile.txt'); If you really need this to be a .m ...

nästan 7 år ago | 0

Answered

Fastest Way of Opening and Reading .csv Files (Currently using xlsread)

Thankfully, you don't need to interact with Excel to read csv files. You can use <http://www.mathworks.com/help/matlab/ref/texts...

Fastest Way of Opening and Reading .csv Files (Currently using xlsread)

Thankfully, you don't need to interact with Excel to read csv files. You can use <http://www.mathworks.com/help/matlab/ref/texts...

nästan 7 år ago | 2

| accepted

Answered

Interleaving columns of two cell arrays

Here's a function I wrote for you. It contains a subfunction to create the interleaving index. Save this to interleaveCells.m an...

Interleaving columns of two cell arrays

Here's a function I wrote for you. It contains a subfunction to create the interleaving index. Save this to interleaveCells.m an...

nästan 7 år ago | 0

| accepted

Answered

modify all vectors in workspace

Joel, I will preface this by saying you really shouldn't have variables floating around your workspace without knowing their ...

modify all vectors in workspace

Joel, I will preface this by saying you really shouldn't have variables floating around your workspace without knowing their ...

nästan 7 år ago | 0

Answered

Different correlation results using matrix with NaN values

Falco, The documentation for corrcoef indicates that 'complete' is the 'rows' value corresponding to your first calculation. ...

Different correlation results using matrix with NaN values

Falco, The documentation for corrcoef indicates that 'complete' is the 'rows' value corresponding to your first calculation. ...

nästan 7 år ago | 0

Answered

write cell array of strings in text file

filePh = fopen('features.txt','w'); fprintf(filePh,'%s\n',Strings{:}); fclose(filePh);

write cell array of strings in text file

filePh = fopen('features.txt','w'); fprintf(filePh,'%s\n',Strings{:}); fclose(filePh);

nästan 7 år ago | 8

| accepted

Answered

save cell array of strings and doubles to excel file

You can write cells directly to the file. If you're using xlswrite, you should specify a target file with an .xls or .xlsx exten...

save cell array of strings and doubles to excel file

You can write cells directly to the file. If you're using xlswrite, you should specify a target file with an .xls or .xlsx exten...

nästan 7 år ago | 3

| accepted

Solved

Remove all the words that end with "ain"

Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

nästan 7 år ago