Answered
Multiple plots with a several of variables
hello again a basic for loop demo on dummy data samples = 100; data = rand(200,samples); [m,n] = size(data); tra...

4 years ago | 0

| accepted

Answered
How to remove corresponding rows of a second array in the case of NaNs in the first array?
hello again a for loop is maybe overkill , but as it's what your are asking for , this is my suggestion : i prefered the nam...

4 years ago | 0

Answered
Reading and combining multiple .txt files
hello again try this - we can expand on that for further processing or saving... natsortfiles is a very usefull tool to make...

4 years ago | 0

Answered
When i run the blow code, the loop gets stuck on the underline line and it says that the indices on the left are not compatible with the indices on the right.
hello try this (T is a 3 x 3 matrix not a scalar so it must be stored in a cell) clc clear all sigma1=0.002; sigma2=-0.003...

4 years ago | 0

Answered
How to isolate duplicate strings in cell array?
hello here you are : a = [ {'still'}; {'while'}; {'until'}; {'light'}; {'still'}; {'built'}; ...

4 years ago | 1

| accepted

Answered
how to convert images from a folder and save in other
hello Claudia try this and adapt it to your needs % select appropriate options below and adapt code to your specific needs .....

4 years ago | 0

Answered
How do I remove frequency component on my spectrum after generating interference signal?
hello I have already answered this question here : How to remove relative frequency information in time domain? - (mathworks...

4 years ago | 0

Answered
Finding row values given a position.
hello see example below : use find with linear indices output (see the doc) A = randn(5,3) ind = find(A>0 & A<1) B =...

4 years ago | 1

| accepted

Answered
Duration of generated sound not correct
hello some minor modifications and suggestion Amp = 0.5; %amplitude Freq = 1000; %Frequency of the sound F...

4 years ago | 0

Answered
Adding fading Background color (green --> yellow --> red) to plot(x,y)
hello daniel try this and tune the pos_yellow parameter to get exactly the visual aspect yu want xdata = [1.378 1.398 1.467 1....

4 years ago | 0

| accepted

Answered
How to find 5 consecutive values above threshold within a certain window?
hello here you are my friend : A = [6 7 8 8 8 7 6 7 6 2 7 8 9 3 3 4 6 7 8 9]; buffer = 5; % nb of samples in one buffer (...

4 years ago | 0

Answered
I have data in time domain, and wants to convert it in frequency domain using FFT analysis, can any one please help me out
hello try this / adapt to your needs NB : the sampling rate was not defined in the post , so change it if needed all the bes...

4 years ago | 0

Answered
How to smooth this contourf plot?
hello with this FEx submission, you should be happy now smooth2a - File Exchange - MATLAB Central (mathworks.com) DATA2 =...

4 years ago | 2

| accepted

Answered
How can I export fitted data and create an excel X,Y plot with it?
hello from the picture it seems a 1 term gaussian model would suffice (note that the second term has b2 = -17 which is even no...

4 years ago | 0

| accepted

Answered
How can I add a constant to a variable during a simulation in Simulink?
hello I had no particular problem doing the same simulink model and running it . what is your issue ?? NB : you post that the...

4 years ago | 0

Answered
Omit detrending in certain portion of signal
hello may I suggest a small improvement here - this avoid finding manually the samples that shoudn't be detrended so whatever...

4 years ago | 0

| accepted

Answered
Matrix Issue Line 33, 35, 37
hello I put the dots so that the multiplication and division are performed element by element between arrays , but the result ...

4 years ago | 0

Answered
Incremental display of data points in a 3D scattered plot
hello this would be my suggestion adapt the amount of pause to your needs all the best clc A = load ('TimespanTutorial.t...

4 years ago | 0

| accepted

Answered
Multiply array if number is under certain value
hello this is very simple - see below : P_out = 1000000 + 80000*randn(10,1); % dummy data plot(P_out) hold on ind = P_o...

4 years ago | 2

Answered
How to obtain r^2 (r squared) value of linear regression plotted using 'lsline'
hello see suggestion below - even no need of lsline clc clearvars % dummy data x = (0:100); a = 1.5; b = 0.235; y =...

4 years ago | 2

Answered
How to use nested loop to produce the row and columns like that
hello seems to me B is simply A but rows 2 and 3 for columns 3 and 4 are empty (filled with NaN) code : A = [2,4,8,7,3;2,...

4 years ago | 1

| accepted

Answered
Spatial filtering from FFT results
hello my suggestion below look at the yellow trace y = readmatrix('metrology_s1.csv'); samples = numel(y); % crea...

4 years ago | 0

Answered
How can get r square value for a plot having two axis out of which one has scatter points and the other axis has line plot?
hello you have to make the two data sets of same length. So, I would suggest you do interpolation (with interp1) of the "lin...

4 years ago | 0

Answered
error with curve plotting (polynomial
hello maybe try this code clc clearvars % data data = readmatrix('DATA.xlsx'); x = data(:,1); y = data(:,2); % ...

4 years ago | 0

Answered
Fitting a modified gaussian
hello I am by no mean a curve fitting or stats expert but this is what I could achieve : this is a reverse log normal distri...

4 years ago | 1

| accepted

Answered
How do I extract the raw data from a plot made using the cwt function?
hello again maybe try this code. It uses the "another_cwt" function (attached) you can also get from FEX : https://fr.mathw...

4 years ago | 0

Answered
Find all datapoints in an audio file where a tone was recorded and snip them out.
hello this would be my suggestion. the individual segments are selected based on the signal rms value and their length. here ...

4 years ago | 1

| accepted

Answered
how to plot binned data?
hello maybe this ? you can change the number of bins (M) Data = readmatrix('Data.xlsx'); Temp = Data(:,1); Aer1 = Data(:,...

4 years ago | 1

Answered
Doubt in matlab coding
hello here you are my friend, without a for loop a=3;b=8; Eg=[50 100 150 175 200 250 300]; Egm=mean(Eg); P=[20 15 10 5 1 0...

4 years ago | 1

| accepted

Answered
Help Segmenting signal processing
hello Nina I was about to reply on your other post when it disappeared : did you delete it ? For your info, this was the demo...

4 years ago | 0

Load more