Answered
Rotate stacked plot Labels to have them vertical - App Designer
You can get the axis handles in stackedplot using the undocumented NodeChildren property. Then rotate and center the labels. r...

6 years ago | 6

Answered
Change yticks using a stacked plot
You can get the axis handles in stackedplot using the undocumented NodeChildren property. Then set YTick. rng('default') h = s...

6 years ago | 10

Answered
How to reverse x-axis in a stacked plot.
You can get the axis handles in stackedplot using the undocumented NodeChildren property. x = [4 3 2 1]; y = [2 3 4 5; 3 4 5 6...

6 years ago | 1

Answered
Distance between points in a table
>I have a table containing the (x,y) coordinates and I need to find the distance between each point [without using pdist | pdist...

6 years ago | 0

Submitted


stackedaxes() - an alternative to stackedplot
STACKEDAXES produces stacked plots similar to Matlab's stackedplot() but returns graphics handles allowing the user to modify th...

6 years ago | 305 downloads |

5.0 / 5
Thumbnail

Answered
Highlight y-max
plot(x_val,y_val); hold on; [~,idx] = max(y_val); plot(x_val(idx),y_val(idx),'r*') text(x_val(idx),y_val(i...

6 years ago | 0

| accepted

Answered
Number of digits in heatmap plot
I think what you mean is that your heatmap values contain 2 decimal places except for integer value and you want to include two ...

6 years ago | 9

| accepted

Answered
data loop for matlab
Read data in as a table (see readtable) Convert the year-month-day columns to a single datetime vector and convert the table to...

6 years ago | 0

| accepted

Answered
How to plot f: y=e^-x.sin^2x function in matlab?
Errors to fix (numbers refer to the characters above the numbers) f: y=e^-x.sin^2x % 1 2 34 5 f: is not valid matla...

6 years ago | 2

Answered
why wont my code show my line in the plot?
The code works well if you remove the last line. Note that y-limit of your plot is 25000-50000. The last line of your code is ...

6 years ago | 0

Answered
How to code so that the person can not press enter to continue?
Create a local function to continually prompt the user as long as the response is empty. The "inputWrapper" function will be ad...

6 years ago | 0

| accepted

Answered
Problem with break statement
> ...shouldn't it end the 2nd for loop since if statement is under 2nd for loop... ? Yes, it should end the 2nd loop and that's...

6 years ago | 0

| accepted

Answered
Как вырезать одну поверхность из другой? / How to cut out one surface from another?
Привет Павел > я хочу получить квадрат с дырой внутри от круга > i want to create a square with a hole inside from the circle ...

6 years ago | 2

| accepted

Answered
Looking to flip plot
Flip the xdot, ydot vectors and their sign [x, y] = meshgrid(-2.5:.5:2.5, -2.5:.5:2.5); xdot = (-1*x) + (2*y); ydot = (-1*x)...

6 years ago | 0

Answered
XLabel and YLabel Font Size
You can access the axis labels in the step function directly with 2-3 lines of code. The xlabel and the ax.XLabel return diff...

6 years ago | 0

Answered
How to get the index from a matrix?
Assuming B is in ascending order, idx(i) contains the index value of B that is closest to but not less than A(i). A = [2;7.5;...

6 years ago | 1

| accepted

Answered
Aligning axes of two plots, one categorical axis, one datetime axis
Convert the datetime strings to datetime values and use them as the grouping variable in the boxplot. Set the datetime format be...

6 years ago | 0

Answered
need to to put input from user in the legend
Instead of setting the legend string from the legend function use the DisplayName property in the plot function (see demo). p...

6 years ago | 0

Answered
How to position the legend such that it is not over the plots and also how to make horizontal legends?
See the location, orientation, and NumColumns options legend(___,'Location',lcn) legend(___,'Orientation',ornt) NumColumns

6 years ago | 0

| accepted

Answered
split data to train,test and validation
If you have the Statistics and Machine Learning toolbox, use cvpartition. Otherwise, randperm to create indicies that separate ...

6 years ago | 0

Answered
How to plot a legend with multiple confidence intervals?
Use the graphics object handles to specify which objects you want in the legend. See 4 "% ADDED" comments below X.label = [0 ...

6 years ago | 1

| accepted

Answered
How to add array of data in new row UITable using same callback function ?
nr=1; for i=1:10 nr=nr+1; end app.UITable.Data(nr,:)=data; The secti...

6 years ago | 0

| accepted

Answered
issuing a warning with details
How to add a hyperlink to warning message % Define message that will appear when user clicks hyperlink. explanation = ['Here ...

6 years ago | 1

| accepted

Answered
How to select data outside a defined range
You were close. You don't need a loop and you should use OR. A = [-10 -15.4 12 0 16 20]; B = zeros(size(A)); idx = A<-15 |...

6 years ago | 0

| accepted

Answered
Finding elements of one vector that are closest to elements of another
Here's a lower-level approach (~10x faster than matchpairs but that function is also quite fast). Use implicit expansion to c...

6 years ago | 1

Answered
outerjoin between timetables changing the time format
The problem could not be reproduced in r2020b suggesting that his has been fixed since r2017a. " would you please tell me h...

6 years ago | 0

| accepted

Answered
Strange Behaviour using Zoom with app designer
According to the documentation, the zoom() function can receive a figure handle as input, not an axes handle. Zoom is applied t...

6 years ago | 0

| accepted

Answered
How do I use characters with an if statement?
If you want to consider case (assuming str, q, and Q are all strings or character arrays) if any(strcmp(str, {q,Q})) % [q,Q] fo...

6 years ago | 0

Answered
Hot to get an xlabel on a clustergram object?
How to add an XLabel | YLabel | Title to a clustergram Use addTitle, addXLabel addYLabel Demo: cgo = clustergram(rand(20,20))...

6 years ago | 0

| accepted

Answered
How to remove top dendogram from clustergram plot
"I cannot find a way to hide the top dendodogram in the final plot." % create clustergram rng('default') cg = clustergram(ran...

6 years ago | 0

Load more