Réponse apportée
Checking if minimum of a matrix occurs on the diagonal
with a slight modification of Adams comment: diag(testMatrix) == min(testMatrix , [], 2) min accepts the dimension in wh...

environ 6 ans il y a | 0

| A accepté

A résolu


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

environ 6 ans il y a

A résolu


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

environ 6 ans il y a

A résolu


Get the area codes from a list of phone numbers
Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-6...

environ 6 ans il y a

A résolu


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

environ 6 ans il y a

A résolu


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

environ 6 ans il y a

A résolu


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

environ 6 ans il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

environ 6 ans il y a

A résolu


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

environ 6 ans il y a

A résolu


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

environ 6 ans il y a

A résolu


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

environ 6 ans 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 6 ans il y a

A résolu


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

environ 6 ans il y a

A résolu


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

environ 6 ans il y a

A résolu


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

environ 6 ans il y a

A résolu


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

environ 6 ans il y a

A résolu


Regex match
Many regular expression engines have a simple function to quickly know whether a regular expression entirely matches a string or...

environ 6 ans il y a

Réponse apportée
How can I use a legend for only only line in a subpot?
the legend is correct for what you plotted, each iteration creates 3 plots, the namesConditions has 4 entries, which are assigne...

plus de 6 ans il y a | 0

Réponse apportée
How to remove cells that look seemingly like newline character from cell array?
You should determine which character you are seeing: Extract a cell that contains only the character in question and convert ...

plus de 6 ans il y a | 0

Réponse apportée
Assign XLabel, YLabel from variable, fix YLim
doc xlabel Edit: extented explanation: ax_handle.XLabel returns a handle for the label. This object has a property named "...

plus de 6 ans il y a | 0

Réponse apportée
How to write code the Chebyshev and Mahalanobis distance using bsxfun function?
Hi, your example code does not work. Bsxfun cannot operate on those arrays. When X (as in your case) is an Nx2 matrix, and y...

plus de 6 ans il y a | 0

| A accepté

A résolu


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

presque 7 ans il y a

Réponse apportée
sprintf - Linux OK but Windows Warning: Escaped character '\.' is not valid. See 'doc sprintf' for supported special characters.
The warning you get should be: Escaped character '\%' is not valid. What you want is a platform dependent filesep ...

presque 7 ans il y a | 0

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

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

presque 7 ans il y a

Réponse apportée
Change a for loop iteration if condition is met
with a while loop: a=5; b=0; c=0; t = 1; while t <=100 a = a+t; if a == 20 b = 20; ...

plus de 7 ans il y a | 0

Réponse apportée
Drawing a white line on an image using (rho, theta).
My comment was the answer, so to stick to the structure of this forum: Your calculation of x and y yields to wrong values. If...

plus de 7 ans il y a | 0

Réponse apportée
vector thats sorts values , even or odd, using only function
I agree with Guillaume and Jan, you should explain a bit more of your problem. I'm not going to write the function, but here are...

plus de 7 ans il y a | 0

Réponse apportée
How to implement a (semi)automated algorithm for thorax and lung segmentation?
Have a look at <"https://de.mathworks.com/matlabcentral/answers/182511-model-reconstruction-from-ct-slices" this> and the mentio...

plus de 7 ans il y a | 0

Réponse apportée
How can read binary file one by one?
have a look at the <https://de.mathworks.com/help/matlab/ref/fread.html fread> function

plus de 7 ans il y a | 2

| A accepté

Charger plus