A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

Réponse apportée
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...

environ un an il y a | 1

| A accepté

Réponse apportée
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,...

environ un an il y a | 0

| A accepté

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

A résolu


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

environ un an il y a

Réponse apportée
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)); ...

environ un an il y a | 0

Réponse apportée
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 ...

environ un an il y a | 0

Réponse apportée
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...

environ un an il y a | 0

Réponse apportée
Struct to double conversion
There are 2 ways of converting an image to double format: 1. Using im2double() function: double_images=[]; ...

environ un an il y a | 0

A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


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

plus de 2 ans il y a