Answered
Why the amplitude of theFFT trasform is not equal as the amplitude of the input signal?
hello FYI see code below it iplement a peak hold fft averaging technique; also the spectrogram principle is coded (so you can...

5 years ago | 0

Answered
filtfilt vs self coded filtfilt giving different results.
hello IMHO the most obvious error is that your second simulation runs on a completely different filter see the second time y...

5 years ago | 0

Answered
How can I avoid offset at start and end of signal when using xcorr-function?
hello Simon I tweaked a bit your code ; see my comments and mods no more manual cuts needed it's all automatic; also there i...

5 years ago | 1

| accepted

Answered
Problème avec une boucle if
Bonjour Léana est ce que tu peux partager l'ensemble du code + données d'entrée ?

5 years ago | 0

| accepted

Answered
How to get a best-fit parabola using elementwise multiplication
hello Robert simply apply what the exercise description says : you are supposed to fit a parabola of the form y=C+Dx+Ex^2 th...

5 years ago | 0

Answered
calculate the average wind intensities
hello you need to compute the magnitude of your 3 components vector (and plot it against time) mag =sqrt(u.^2 + v.^2 + w.^2)...

5 years ago | 0

| accepted

Answered
Curve fitting of growing measurement data set
hello this little code snipset in case it fills your needs % dummy data n = 200; x = 1:n; y = 1-exp(-x/5); yf = -flipl...

5 years ago | 0

Answered
Displacement from accelerometer data
hello the drift in the displacement is due to the fact that the velocity itself is not a zero mean signal so if you are inte...

5 years ago | 1

| accepted

Answered
How to fscanf a text file of characters to a string array/vector, but not a 1x1 string?
hello try this : fid=fopen('sample.txt', 'rt') data=split(fscanf(fid,'%c')) fclose(fid); % gives : data = 6×1 cell a...

5 years ago | 1

Answered
Plots giving me straight lines instead of harmonic oscillation lines
Hello there were some bugs ... where to start ? first the way you order the recursive equations can have some importance us...

5 years ago | 0

| accepted

Answered
Trying to plot my bandpass filtered signal in a time series, but I need to divide the x values by 2000 (the sampling rate) to get it to plot in seconds instead of samples/seconds
hello Rachel in most of my matlab code, I have to get the samples amount and define explicitly the time vector like this samp...

5 years ago | 0

Answered
only reading and plotting data for one file while I want it to read and plot data for 12 files
hello all plots are updated at each loop iteration on the same figure(1) so at the end you have only one figure showing the la...

5 years ago | 1

| accepted

Answered
How to smooth a graph?
hello see below some examples of how to smooth data; plenty of possibilities... Fs = 1000; samples = 1000; dt = 1/Fs; t = ...

5 years ago | 0

Answered
How can I find when a signal stops oscillating more than a certain value?
hello sure it's doable use the attached code example to do a first derivative of your data, and then find the first index of...

5 years ago | 0

| accepted

Answered
Getting the Fundamental Frequency from Line to Line Voltage without distorting the signal.
hello I have not really understood what the purpose of Y data from the figure was, but I guessed that the plan was to get the "...

5 years ago | 0

| accepted

Answered
read each line a text file using Matlab function
hello Nadia if you use readvars, you have to know / specify how many variables you want to output example , if I specify on...

5 years ago | 0

Answered
while loop in a for loop
hello again official answer below : code fixed !! the output of the function was incorrect (wrong index and not at the right...

5 years ago | 1

| accepted

Answered
Zeros between Sign Change of Values in column
hello this is my suggestion below + see attachements data = importdata('data.txt'); x = data(:,1); y = data(:,2); thr...

5 years ago | 0

Answered
I want to do loop operation of these files but fail to get the desired result. Can anyone help me to figure out the problem?
hello I tweaked a bit your code , if fact it was simpler in my opinion to do the full 4 x 4 loops instead of doing the specifi...

5 years ago | 0

| accepted

Answered
Assign same linewidth to a grouped barplot
hello v1=rand(10,1); v2=rand(10,1); x=[1:10]; combined=[v1,v2]; barplot=bar(x,combined,'grouped'); barplot(1).BarWidth = ...

5 years ago | 1

| accepted

Answered
Generate Frequency domain with FFT function of 3-axis accelerometer data
hello see this example - you can adapt it to your own needs all the best %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load s...

5 years ago | 0

Answered
Remove rows from table identified in a second string array
hello Christopher thi would be my suggestion notice I changed the last 3 names in Post_Inflate_names to get a matching case ...

5 years ago | 0

Answered
Fit an exponential function to time-series data
hello this is the poor man solution without any toolbox data was stored in txt file your B = -1/b_sol from my code below ...

5 years ago | 1

Answered
How to identify datasegments that correlate to a given frequency
hello Katy I built this on your code, so first option is to see if the time interval between consecutive peaks are similar or n...

5 years ago | 0

| accepted

Answered
Rename dynamically columns name of a vector inside of a for loop
hello Sara if you stick to the eval method , this is how you should code it : eval(['d_' num2str(kk) ' = d;'])

5 years ago | 0

| accepted

Answered
How can I change the color of the face of a cube created using the slice command?
hello use handles to modify face colors here I changes all external faces to black [X,Y,Z] = meshgrid(0:3); V = X.*exp(-X....

5 years ago | 0

Answered
How do I add noise to a sine wave signal to get the output below
hello simply the time vector was not correct , just define it once for all plots (and with max value = 10 s and not 1 s) als...

5 years ago | 1

| accepted

Answered
Reading data from multiple files in ascending order.
hello this is my suggestion , based on natsortfiles (from FEX : Natural-Order Filename Sort - File Exchange - MATLAB Central ...

5 years ago | 0

| accepted

Answered
How to specify order of a Moving Average Filter?
hello a moving average filter has only a window length (and window type) as parameters, the order is not meaningfull here may...

5 years ago | 1

| accepted

Answered
Hysteresis curve and envelope
hello Emily this is how I solved it (blue curve) hope it helps %Column 2 Force vs Displacement clc;clear;close all; %Tra...

5 years ago | 2

| accepted

Load more