Answered
How to replace arrays containing consecutive repeated numbers by zero?
For some reason I'm drawn to detecting / counting consecutive numbers. I must have answered more than 5 questions similar to th...

6 years ago | 2

| accepted

Answered
How to plot result from fitnlm?
Demo: plotting fitnlm results with two predictors This demo supplements Star Strider's answer by showing how to plot fitnlm() r...

6 years ago | 0

Answered
Creating Timetable from Excel for Driving Cycle.
Create the timetable opts = detectImportOptions('GPS Cycle.xlsx'); opts.VariableTypes = {'double','datetime','double','double...

6 years ago | 0

| accepted

Answered
Mean value of a subarray
The answer in this link computes segmented averages as you describe except instead of averaging 1:8, 8:15, ... , it averages 1:8...

6 years ago | 0

| accepted

Answered
How to wait for a button to be pressed?
Place this in the line where you want execution to pause uiwait(handles.figure1) % use your figure handle Then, from within t...

6 years ago | 0

Answered
Why does corr function result depend on the number of columns ?
Understanding the output of rho=corr(x) r = corr(x,x); is the same as r = corr(x); If a single value is changed in x in col...

6 years ago | 0

| accepted

Answered
How to plot a histogram in a waterfall plot?
The bars will have to have a width value but you can make that value very small to appear as flat. For bar3(Z), when Z is a m...

6 years ago | 1

Answered
how to use cells as xlabel in stackedplot
First convert your matrix to a table and use the variable names in your cell array. T = array2table(x, 'VariableNames', varNa...

6 years ago | 0

| accepted

Answered
MATLAB app designer close during running
Open the problematic app in appdesigner using r2019b (or whichever release you plan on using). When an app is developed in one ...

6 years ago | 0

Answered
Subplot Titles left justified
Prior to Matlab r2020b Set the title's units to Normalize Move the title leftward Set the title's HorizontalAlignment to Left...

6 years ago | 4

| accepted

Answered
How can I draw equations I found on WolframAlpha in MatLAB?
You must convert the mathematical notation to a syntax recognized by Matlab. For example, this segment, becomes any of the...

6 years ago | 0

| accepted

Answered
Give focus to an Edit Field
In MATLAB R2022a and later Using AppDesigner in MATLAB R2022a and later, control tab/focus order in AppDesigning using the new ...

6 years ago | 3

Answered
How can I delet a point in Uiaxes thats Handlevisibility is set to 'off''
Control what appears in the legend without setting HandleVisibility to off. Use object handles to specify what belongs in the...

6 years ago | 0

| accepted

Answered
Histogram won't plot decimals
The problem is likely caused by at least one of the elements in column 4 that is not numeric. The non-numeric value could be pa...

6 years ago | 1

Answered
Why a linear model cannot be plotted in app designer?
This issue has been fixed in MATLAB R2023b Starting in MATLAB R2023b, provide the axis handle as the first input to plot the fi...

6 years ago | 3

| accepted

Answered
How to set colorspace of line in special code of graph?
Change the color of all graph edges plot(G, . . ., 'r') % red plot(G, . . ., [.5 0 .5]) % purple Change the colors of...

6 years ago | 0

Answered
GUI, make a handle disappear
"I want to achieve that when clicking both pink clickboxes I want to make all the red handles disappear. " The function you sha...

6 years ago | 0

| accepted

Answered
How can I extract X and Y from gauss2 fit or any other fit (poly2, poly 3, ...)?
The fit function merely fits your pre-existing (x,y) values and returns a fitobject that contains parameter values you can use t...

6 years ago | 0

| accepted

Answered
How to use impixel in UI created in App Designer
As of r2020a, impixel() is not supported with uifigures (e.g. AppDesigner; see Graphics Support in App Designer). Workaround ...

6 years ago | 1

Answered
How to find point of intersection of lines given y value
For each line, 1) Compute the slope of the line using the standard slope forumula. m = (y(2)-y(1)) / (x(2)-x(1)); 2) Compu...

6 years ago | 0

Answered
how can I define a global variable in app designer?
There are very few reasons, if any, to use global variables in apps and it's usually the sign of trouble. If the variable is m...

6 years ago | 3

| accepted

Answered
Exporting the plot in regression learner
Doc page for exporting plots in Regression Learner app: https://www.mathworks.com/help/stats/export-plots-in-regression-learner...

6 years ago | 0

| accepted

Answered
"The file has been modified outside of MATLAB Editor. Do you want to reload it?" error. How to repair that?
This is a band aid, not a solution. This is the error dialog that appears when a files stored on a mapped network drive are e...

6 years ago | 1

Answered
A function that outputs multiple plots? Part 2
If you want to set the figure number, h = figure(); % or h = figure(5); plotoutput(__,h) % fill in your other inputs ...

6 years ago | 0

Answered
How to enable the colorbar to only show the vertical scale with values ?
The plot below was produced using your exact code as it appears in the comment under the question plus the following two lines a...

6 years ago | 0

| accepted

Answered
App Designer - Understanding the Basics
The problem, as the error message indicates, is that HeatmapChart objects cannot be a child of UIAxes. It's just not supported ...

6 years ago | 0

Answered
upper axis title doesn't fit in the output of my plot
Reduce the height of the first axis % This reduced the height to 80% % Play around with the value to get what you want ax1.P...

6 years ago | 0

| accepted

Answered
How to add a noise in my Input graph?
noise = randn(size(signal)) will return an array of random values from a standard normal distribution with mean=0 and varianc...

6 years ago | 0

Answered
Using data from timetable to make a histogram
Use histogram(x) where x is your data TT1.stddev1. See that link of additional syntaxes that allow you to set the bins.

6 years ago | 0

Answered
Filling in the area around an ellipse?
x = [x_frame, ellipse_x]; y = [y_frame, ellipse_y]; patch(x,y, 'r', 'EdgeColor', 'none') axis equal % optional

6 years ago | 0

| accepted

Load more