Answered
What’s my error ?!
One reason it's difficult to see the error is because all of your code is in 1 line. There's no advantage to doing this. Disad...

6 years ago | 0

Answered
How to combine matrices
Here's a full demo created prior to seeing the other answers here, but uses the same approach (which suggests you the advice giv...

6 years ago | 1

Answered
How to check if a column of a table exist?
Use strtrim to remove leading and trailing whitespace. Use startsWith to determine if the any of the character arrays start wit...

6 years ago | 0

| accepted

Answered
Extracting data from a signal
This segments the monotonically increasing part of each pulse, as depicted in the 2nd image in my comment under your question. ...

6 years ago | 1

| accepted

Answered
I can't retrieve the user input information in a table when the user closes the table.
Callback functions do not return outputs. You must store the values somewhere and then retreive them. Here's a solution to thi...

6 years ago | 1

| accepted

Answered
Compare two cell array (different sizes) and return 0 or 1
A = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'}; B = {'C', 'E', 'J'}; idx = ismember(B,A);

6 years ago | 0

| accepted

Answered
How to specify date ticks on plot
Convert your dates to datetime values using datetime(). Then use xtickformat('yyyy') to set the datetime format for the x-tic...

6 years ago | 1

Answered
How to detect the black line from a captured image?
If you zoom in to the lower side of the image histogram you created, you'll notice a hump just before x = 40. imhist(grayImage...

6 years ago | 0

Answered
Interactive Plot that returns a value
Check out ginput() and let us know if you have any quesitons or problems.

6 years ago | 1

| accepted

Answered
Run a script for all subfolders
Try this out, mainDir = 'C:\Users\name\Documents\MATLAB\rocording\myproject'; % <-- replace with your real path % Get a list ...

6 years ago | 1

Answered
Additional properties from regionprops
You could also return the "ConvexHull" values which will return a p-by-2 matrix for each polygon where each row of the matrix co...

6 years ago | 0

| accepted

Answered
How to add space between labels values and its represented values in a plot?
You can add vertical space by increading the value of the 2nd input to text() text(BBU(i,2), BBU(i,1) * 1.05,labels, . . .) % ...

6 years ago | 0

| accepted

Answered
How to plot max, min and average over a histogram?
(continuing from comment section under the question) To show the min or mean, substitute those values in for the max value in ...

6 years ago | 0

| accepted

Answered
How do you create a grouped boxplot with categorical variables on the x-axis.
If your boxplot data are matrices with the same number of columns, you can use boxplotGroup() from the file exchange to group th...

6 years ago | 8

Answered
plot 2 different y-values for the same x-value in box plot
Check out the boxplotGroup() function on the file exchange. If your boxplot inputs are matrices with the same number of columns...

6 years ago | 0

| accepted

Answered
how to replace "&&" in a loop
"how to replace "&&" in a loop" If, for whatever reason, you don't like the && symbols, if a==x && b==y d=2; end could...

6 years ago | 0

Answered
Functions on same plot
Set up a loop that evaluates the function for each c-value and adds the line to the plot. allc = [c_1, c_2, c_3, c_4]; colors...

6 years ago | 0

Answered
How to label a plot in Matlab with combine label?
Option 1: use boxplotGroup() See boxplotGroup() on the file exchange. If your boxplot data are matrices with the same number of...

6 years ago | 0

| accepted

Answered
How to align matrices in a static text box?
"Question no. 1: i have no idea what that means" See the inline comments below for an explanation of each line. % This retri...

6 years ago | 0

Answered
number of times a value appears in an array or vector
I need something to tell me how many 1's appear in PlayersHand each time I run it count = sum(PlayersHand(:)==1);

6 years ago | 1

| accepted

Answered
Scatterhist without normalized y axes on the marginal histograms. How ?
" when plotting data using a grouping variable the marginal histograms look all normalized to their own maxima" That shouldn't ...

6 years ago | 0

| accepted

Answered
Legend for yyaxis at two different locations
The second call to legend() is replacing the first legend (you can only have 1 legend). I reworked your code to use yyaxis ins...

6 years ago | 4

| accepted

Answered
Symbols work in plot but line doesn't
I assume P and v are both scalar values. If that's the case, the definition of a line requires at least two value. For example...

6 years ago | 1

Answered
Error using subplot with App Designer
The parent of a subplot (ie, axes) should be a figure (or Panel objects, Tab object, or TiledChartLayout object). You're using ...

6 years ago | 1

| accepted

Answered
Set colorbar outside the window
Use the location property colorbar(location)

6 years ago | 1

| accepted

Answered
Cleaning data from excel file
If any of the cells in column 9 is equal to 1 then I need the corresponding cells in columns 2 and 3 to be deleted/left empty/m...

6 years ago | 0

| accepted

Answered
Cannot hide/delete UIAxes menu/toolbar
app.UI_Axes.Toolbar.Visible = 'off';

6 years ago | 2

| accepted

Answered
Generate Random position that are not duplicate
This efficient solution takes the following steps. List all integer coordinates within the circle Randomly choose N of those ...

6 years ago | 0

Answered
How can I generate this plot?
The quiver arrows all have fairly small magnitudes which makes it difficult to see the arrows but you can reproduce the figure a...

6 years ago | 0

| accepted

Answered
[DISCONTINUED] MATLAB Answers Wish-list #5 (and bug reports)
Expand/Collapse all comments This goes back to Matt Tearle's request in the first wish list (2011). An expand/collapes toggle ...

6 years ago | 2

Load more