Answered
Audioread Impulse noise detection and removal of impulse signals
This uses findpeaks to locate the impuse signal in channel 2 of the wave file. Peaks are required to be at least 3 standard devi...

6 years ago | 0

| accepted

Answered
matlab gets different answers for the same code
Summary of comments under the question The two functions being compared aren't necessarily doing the same thing though, with so...

6 years ago | 0

| accepted

Answered
How to shade the area between the upper line and the lower line? thank you!
fliplr() flips the vector left to right. patch() plots the colored patch between the lines. x = [t, fliplr(t)]; % ...

6 years ago | 0

| accepted

Answered
Scatter plot changes markers when using 'filled' option
The shape of "filled" scatter points aren't necessarily changing to a square, although at some marker sizes it does appear to be...

6 years ago | 2

| accepted

Answered
Bin data into equally spaced intervals
This solution uses histcounts2 to bin the x and y values into a 12x12 grid (you can specify the number of bins). Then, accumarr...

6 years ago | 1

Answered
Add columns to the tables that stored in a cell
"I want to add 2 columns in each T, one for latitude and one for longitude." C2 is a 40x32 cell array of 336x1 tables. Is your...

6 years ago | 1

| accepted

Answered
Numeric Editfield in App Designer
To select variables from the base workspace into app designer you need to run the who or the whos function in the base workspace...

6 years ago | 0

Answered
App Designer app property is saved as double although I enter strings
By default the property is initially defined to class=double. Here are two solutions. Set the property to a string array by ...

6 years ago | 2

| accepted

Answered
Sum of each row?
A = reshape(1:24,2,3,4); % input: [n x m x k] array val = squeeze(sum(A,2)).'; % output: [k x n] matrix

6 years ago | 1

| accepted

Answered
Interpolate scattered latitude and longitude (climate) data and plot
The border your plotting (via Greene's borders function), is not the same as the maps produced by the map toolbox. So it's tric...

6 years ago | 5

| accepted

Answered
How can i make automatic rotation using PCA to set the galaxies oriantation to be horizontal?
This approach uses the Orientation property of the regionprops() function to get the angle between the x-axis and the major axis...

6 years ago | 3

| accepted

Answered
framed nodelabel in a graph
If there were a way to access the handles to the node label text objects, it would be easy to draw rectangels (or circles) aroun...

6 years ago | 0

| accepted

Answered
Legend markers displayed to the *right* of the labels
Here's a way to make it look like the legend markers are to the right of the legend text. But in reality, the legend doesn't ha...

6 years ago | 1

Answered
Finding which rows in table contain NaN, save those as new table
If the tables all contain the same variable names (headers), use the variable names to index columns rather than column number. ...

6 years ago | 1

Answered
Closest date to another
A simple, readable, and fast method would be to loop through the dates in date1, find the closest date in date2, and then replac...

6 years ago | 0

| accepted

Answered
How to set the label of a colorbar and tick on color division?
The actual colorbar range will be from 0 to the number of labels. The actual colorbar ticks are at x.5 for each integer between...

6 years ago | 0

| accepted

Answered
drawing lines between nodes in a GUI
Here's a demo that will get you started. You will have to tweak it to work for your data and your requirements. You'll have to ...

6 years ago | 0

Answered
2D histogram plot for N x M matrix
histogram2() creates a bivariate histogram plot that you can apply to your data. Here's a demo that applies this plot to noisy...

6 years ago | 2

| accepted

Answered
Controlling the size of legend markers separately from the font size of legend labels
This solution avoids the use of undocumented legend outputs that have caused problems in the past (example 1, example 2). % Plo...

6 years ago | 7

Answered
App Designer: Create a Discrete Slider
Just be aware that there are discrete knobs (properties) in app designer. But if you want a discrete slider.... Instructions h...

6 years ago | 15

| accepted

Answered
How to set value in a matrix
for i = 1:numel(B) A(1:B(i),i) = 0; end

6 years ago | 1

| accepted

Answered
How to add a column between two columns?
out = [M1(:,1:2), r, M1(:,3)];

6 years ago | 2

| accepted

Answered
How do I combine data from seperate tables into one table with seperate columns
Assuming all tables have the same number of columns with matching Variable Names, you can vertically concatenate them like this....

6 years ago | 1

| accepted

Answered
how code for get image in axes1 to show in axes2?
Adam & Geoff Hayes are giving you the best advice. If you want the same image on two axes, plot it on two axes. Img = imread(f...

6 years ago | 0

Answered
how do i find the matching data for locs when using findpeaks()
If your peaks plot is produced by plot(time, data) and you're locating the peaks with [pks,locs]=findpeaks(data); Then, to p...

6 years ago | 0

| accepted

Answered
Plot same data set on two different y axis scales
You should be using yyaxis instead of overlaying a 2nd axes which can lead to all sorts of problems. https://www.mathworks.com...

6 years ago | 1

| accepted

Answered
How do i get decimal values using randi?
randi() will only return integers. Instead, use rand() which will prouduce random values between 0 and 1; then scale and shift ...

6 years ago | 1

| accepted

Answered
how to get maximum value of the matrix?
M = max(A,[],'all') M = min(A,[],'all')

6 years ago | 0

| accepted

Answered
Not enough input arguments.
My guess is that you have a function named IC with two or more required inputs. But you're treating IC as variable so when you i...

6 years ago | 0

Answered
uitable extent is zero in uifigure (not so in figure)
As of r2019b, update 4, the Extent property of UITables embedded into a UIFigure still returns [0 0 0 0] but to be fair, Extent ...

6 years ago | 0

Load more