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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 9

| aceptada

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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 2

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

casi 6 años hace | 0

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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 2

| aceptada

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

casi 6 años hace | 0

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

casi 6 años hace | 0

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

casi 6 años hace | 1

| aceptada

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

casi 6 años hace | 0

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

casi 6 años hace | 0

Respondida
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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 0

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

casi 6 años hace | 1

| aceptada

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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 1

| aceptada

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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 1

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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 0

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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 0

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

casi 6 años hace | 1

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

casi 6 años hace | 1

| aceptada

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

casi 6 años hace | 1

| aceptada

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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 0

| aceptada

Cargar más