Answered
Log Color Scale command doesn't work
Axes do have a ColorScale property (see documentation). What type of axes and what Matlab release are you using? % Matlab R2...

5 years ago | 0

Answered
Add 2nd horizontal axis to plot
To create axes using tiledlayout you should use nexttile to create the primary axes (see this answer). To create multiple x-ti...

5 years ago | 0

| accepted

Answered
input string data in the function
You're not using the contry1 variable at all in your function. Instead, you've replace it with a character vector 'county1' whi...

5 years ago | 0

| accepted

Answered
how to plot 2D contour lines from the data file
Contour plots require z to be a matrix. contour(Z) You can define the x and y values, too, and they can be vectors or matrices ...

5 years ago | 0

Answered
How to create multiple strings
Don't use eval() at all. 💀💣 Matlab documentation: Alternative eval() Matlab Fandom: Why is it advised to avoid using the "eval...

5 years ago | 1

Answered
How can I run multiple iterations that plot on the same graph?
Using a vector of values x, y is an mxn matrix for m values in Dl and n values in x. Please read Array vs matrix operations. ...

5 years ago | 1

Answered
how to plot all points
Vectorized version... pstep=20; freq = 20:150; maxfreq = 150; tend = maxfreq - freq; itime = cumsum(1./ (pstep.*freq));...

5 years ago | 1

| accepted

Answered
2 yaxis in a tiledlayout
Check out the examples from the documentation. When using Tiledlayout, axes should either be created using nexttile or after yo...

5 years ago | 0

Answered
Plot ellipsoid with only principal section lines
This solution produces a white ellipsoid surface with transparency so that lines in the back are faded. Then it adds the major ...

5 years ago | 0

| accepted

Answered
How can I force the time-axis unit of spectrogram to be 'second(s)' ?
I don't know whether there's an input to spectrogram that could solve this but here's how to fix the labels after the plots are ...

5 years ago | 0

| accepted

Answered
How can I insert a multivariable column into a single column of a table
I'm guessing the error is caused by this line below. Always share the entire error message when reporting an error to eliminate...

5 years ago | 0

| accepted

Answered
how to have a callback function terminate another callback function in a GUIDE gui
For this explanation, callbackFcn1 is the initial callback function and callbackFcn2 is the one that should terminate the first ...

5 years ago | 1

| accepted

Answered
How to find and plot the region of the line where the slope is 2?
If the region contains a true line segment without any curvature, then you can differentiate x and y to find where the different...

5 years ago | 0

| accepted

Answered
Points on a circle
These lines define your circle for each point theta xmax=B*cos(theta)+xhat; ymax=B*sin(theta)+yhat; All you need to do is d...

5 years ago | 0

| accepted

Answered
AppDesigner - Changing EditField font size
My guess is that your list of font sizes are strings and the value returned to the callback function is a string. Since it's a ...

5 years ago | 0

| accepted

Answered
I have a problem with matlab app designer pop up window. PLEASE HELP!!!
There is no built-in option for a pop-up window in App Designer. An even better way to organize space is to use tabs where eac...

5 years ago | 0

Answered
How to center Column names in table
As far as I know,center-justification of uitable column names is not possible (as for r2021a). A recent comment by MathWorks st...

5 years ago | 3

| accepted

Answered
How to have a button in an GUIDE GUI close another .m script?
I'm not sure how this would be useful since a program shouldn't rely on what m-files are opened. Nevertheless, define the file...

5 years ago | 0

Answered
How to change heatmap data labels
Modifications to heatmap are not easy. I suggest recreating the heatmap using imagesc which will look almost exactly the same b...

5 years ago | 2

| accepted

Answered
Define common variable in matlab app/GUI
The values should be stored as app properties so that they are available from anywere within the app. Sharing data within App ...

5 years ago | 1

Answered
How to segment a point cloud along axis
> I want to segment and export a certain number of slices along Z axis The following two demos use the attached file teatpotOu...

5 years ago | 1

| accepted

Answered
gplotmatrix does not show graphics correctly on app designer app
Cause of the error Always share the entire error message when asking how to fix the error. For now I'll assum you received a...

5 years ago | 0

| accepted

Answered
Duration precision in subtracting two datetimes
Set the display format to include up to 9 fractional second digits A = datetime('05-Mar-2021 13:01:53.917194495'); B = datetim...

5 years ago | 3

| accepted

Discussion


New in MATLAB R2021a: Auto rotation of axis tick labels
<</matlabcentral/discussions/uploaded_files/5228/data>> *Starting in MATLAB R2021a axis tick labels will auto-rotate to avoid...

5 years ago | 11

Answered
Determination of data points in each cluster of K-means algorithm
C = kmedoids(___) T = groupcounts(C)

5 years ago | 0

| accepted

Answered
How can I set the limits on the Y axis of a stacked plot?
See this answer.

5 years ago | 0

Answered
Plot stacked bar chart with legends
Legend demo Create the bar plots and assign the bar colors. Combine the bar handles within the same legend and specify the le...

5 years ago | 0

| accepted

Answered
App Designer Figure Properties
If you select the uifigure from the component browser, the figure's properties should appear in the property inspector below. ...

5 years ago | 0

| accepted

Answered
Kindly guide on how to connect the median points of boxplot with line and how to obtain respective colors of boxplot in the legend. Please help. Added the pot for reference.
There are multiple ways to do this. Since you're already finding the median line objects, you could extract the coordinates fro...

5 years ago | 0

| accepted

Answered
How to add constant line y(50) to all plots of stackedplot?
You can get the axis handles in stackedplot using the undocumented NodeChildren property. Then add the constant line object to e...

5 years ago | 1

| accepted

Load more