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

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

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

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

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

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

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

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

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

5 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

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

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

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

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

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

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

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

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

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

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

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

5 years ago | 0

Answered
Reduce font size of column labels in clustergram
Rather than changing ShowHiddenHandles which will affect all objects, you can get the figure and axes handles using findall and ...

5 years ago | 1

Answered
Number of arrows, and the correct legend in the quiver function
You just need to get rid of some values in xfilt, zfilt, ufilt, vfilt. For example, to plot 1/3 of the vectors, mask = 1:3:nu...

5 years ago | 1

| accepted

Answered
Problem in plotting to the appdesigner UIAxes and showing error Reference to non-existent field 'UIAxes'.
The first thing the LoadFileandprocessFIDButtonPushed does is delete its inputs (yikes!!). There's almost never a reason to u...

5 years ago | 1

| accepted

Answered
convert point from color map / color bar to color vector
Background info scatter & scatter3 use the axes' colormap along with the color axis limit (caxis|ax.CLim) to set the color of t...

5 years ago | 0

| accepted

Answered
trying to pad smaller table to larger table
Update: You can use paddata starting in MATLAB R2023b to pad tables. Padding & horizontally concatenating tables As of r2020b...

5 years ago | 0

| accepted

Answered
ROI deleted event listener
Use onCleanup to define a function that is evoked when the ROI is deleted. Store the onCleanup handle within the object. Demo: ...

5 years ago | 1

Answered
Screenshot entire window in AppDesigner
Starting in Matlab r2020b, you can take snapshots of an app / uifigure using the functions below. See demos: https://www.mat...

5 years ago | 0

Answered
Saving the application (Appdesigner) together with provided inputs
"I want to provide a button in the program such that it saves the program together with selected options and provided inputs." ...

5 years ago | 0

| accepted

Answered
How to continue for loop if file not found?
First, "file_path" should be filepath to match the pre-defined variable name 3 lines above. Second, if the filepath does not e...

5 years ago | 0

| accepted

Load more