解決済み


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

5年弱 前

解決済み


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

5年弱 前

解決済み


Calculate the Levenshtein distance between two strings
This problem description is lifted from <http://en.wikipedia.org/wiki/Levenshtein_distance>. The Levenshtein distance betwee...

5年弱 前

解決済み


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

5年弱 前

解決済み


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

5年弱 前

解決済み


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

5年弱 前

解決済み


What is the next step in Conway's Life?
Given a matrix A that represents the state of <http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of Life> at one ...

5年弱 前

解決済み


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

5年弱 前

解決済み


Find state names that end with the letter A
Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

5年弱 前

解決済み


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


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

5年弱 前

解決済み


Read a column of numbers and interpolate missing data
Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

5年弱 前

解決済み


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

5年弱 前

解決済み


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

5年弱 前

解決済み


Put two time series onto the same time basis
Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

5年弱 前

解決済み


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

5年弱 前

解決済み


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

5年弱 前

解決済み


Find out sum and carry of Binary adder
Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition. Examples Previo...

5年弱 前

解決済み


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

5年弱 前

解決済み


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

5年弱 前

解決済み


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

5年弱 前

解決済み


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

5年弱 前

回答済み
constructing symatrical matrix out of vector
I'm a little fuzzy on what v is supposed to be (are the off-diagonal elements of H stored in v all multiplied by 2?), so I'll so...

5年弱 前 | 0

回答済み
How can i convert time format to do a plot?
You should be able to use regular expressions to extract the hour, minute, second, and ms values from the time stamps and then c...

5年弱 前 | 0

回答済み
How to plot 3D data as a 2D color plot (with axes representing parameter values)?
I think I get what you're getting at. When you use imagesc, you're plotting an image. Images have coordinates just like lines a...

5年弱 前 | 0

回答済み
Is this a bug in double precision data type?
It's not a bug. What's happening is you're multiplying Inf * 0, which is undefined (it's equivalent to trying to calculate 0/0)....

5年弱 前 | 2

| 採用済み

回答済み
Storing data for "for loop"
You can store your L variables either as rows in a matrix: % Create L matrix with a different L value in each row (I only put i...

5年弱 前 | 0

解決済み


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

5年弱 前

さらに読み込む