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

más de 4 años hace | 0

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

más de 4 años hace | 0

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

más de 4 años hace | 0

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

más de 4 años hace | 1

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 0

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

más de 4 años hace | 1

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 0

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

más de 4 años hace | 2

| aceptada

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 2

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

más de 4 años hace | 2

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

más de 4 años hace | 1

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 0

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

más de 4 años hace | 0

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

más de 4 años hace | 1

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 1

| aceptada

Respondida
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(:,...

más de 4 años hace | 1

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

más de 4 años hace | 1

| aceptada

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

más de 4 años hace | 0

Respondida
How to remove relative frequency information in time domain?
hello this would be my suggestion, based on using multiple notch filters (simply add a new frequency to the list and the filte...

más de 4 años hace | 0

| aceptada

Cargar más