解決済み


Given two arrays, find the maximum overlap
Given two (integer) arrays s1 and s2, create a new array s3 which is as short as possible and contains both arrays. #1 s1 = [...

約1年 前

解決済み


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more here) asserted that readers are relatively insensitive to letter order in words, so long a...

約1年 前

解決済み


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

約1年 前

回答済み
How to sort a cell alphabetically?
The following code sorts a cell alphabetically by converting all the strings to lowercase characters without affecting the origi...

約1年 前 | 1

| 採用済み

回答済み
How to make a vector with elements +1 and -1 only?
Hi charu shree, The following code creates a vector of dimension 1X1000 with values -1 and +1: vect=ones(1,1000)-2*(randi(2,1,...

約1年 前 | 0

| 採用済み

解決済み


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

約1年 前

解決済み


Kaprekar Steps
6174 is the Kaprekar constant. All natural numbers less than 10,000 (except some with same digits) can be reduced to 6174 in the...

約1年 前

解決済み


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

約1年 前

解決済み


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

約1年 前

解決済み


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

約1年 前

解決済み


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

約1年 前

解決済み


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

約1年 前

解決済み


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

約1年 前

解決済み


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

約1年 前

回答済み
How can I test that tab values exist in other sequence?
There are two ways to find the position of each value of vect in seq: 1. Using find() function: pos=zeros(1,length(vect)); ...

約1年 前 | 0

回答済み
How to search for a condition in all index in a row
Hi @Helena Hjørringgaard, Below is the sample code to address the problem you are facing.The approach to the implementation is ...

約1年 前 | 0

回答済み
Special Characters åäö in matlab editor
Hi Daniel Vennetti, I have tried running the commands in the latest version of MATLAB(R2023a) editor and it doesn't produce any...

約1年 前 | 0

回答済み
Struct to double conversion
There are 2 ways of converting an image to double format: 1. Using im2double() function: double_images=[]; ...

約1年 前 | 0

解決済み


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

1年以上 前

解決済み


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

1年以上 前

解決済み


Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

1年以上 前

解決済み


Calculate Amount of Cake Frosting
Given two input variables r and h, which stand for the radius and height of a cake, calculate the surface area of the cake you n...

1年以上 前

解決済み


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

2年以上 前