Answered
Why do I get zero frequencies in a fft when the constant offset is already removed?
hello the fft seems to me inappropriate in this case. If the goal was to find the time difference between the succesive pulses...

ungefär 2 månader ago | 0

| accepted

Answered
Gradient of a multiple line 2d plot,
hello I see you have a passion for for loops ! maybe you can do yours plots without a for loop this time . Added some code...

ungefär 2 månader ago | 0

| accepted

Answered
how can I calculate movmean from 1 periode wave data?
hello we can use the peaks to compute this value as well you can use islocalmax (or islocalmin) to locate local peaks. Some...

2 månader ago | 0

| accepted

Answered
HOW TO PLOT X VS Y AT DIFFERENT Z
hello maybe this ? NB : I used large steps for pressure and temperature to avoid creating very large arrays - adapt to your ...

2 månader ago | 0

Answered
Get y value in plot(t-s diagram)
hello see my demo based on dummy data - trying to reproduce your case code : clc clearvars % dummy data n=1000; y= ...

2 månader ago | 0

| accepted

Answered
How to load a specific column from files + FFT function
helo again as the signals are quite nn stationnary I assumed that a spectrogram is more appropriate than a "simple" FFT (with o...

2 månader ago | 1

| accepted

Answered
for loop summation problem
hello please clarify what is a and b in your request. Usually those letters are used for numerator (B) and denominator (A) of ...

2 månader ago | 0

Answered
Why am I unable to open .csv file with the readmatrix function?
hello workaround suggestions faster with readcell vs importdata >> tic; out2 = str2double(split(readcell('t4md6p1 - partia...

2 månader ago | 1

| accepted

Answered
How can I cut the number of frames down?
hello Hannah I tried to improve my first (very simple suggestion) here some (hopefully) improvements : detection of "valid" ...

2 månader ago | 0

| accepted

Answered
Using a for loop to read in 16 data sheets and storing one value from each data sheet in a vector - full problem explained
hello I don't see why the code needs two for loops seems to me one suffice and this code gives the answer in mSTRESS (vector...

2 månader ago | 1

| accepted

Answered
How to load a specific column from files + FFT function
hello my first suggestion is for looping inside a folder to load txt file data % read current filenames in folder S = di...

2 månader ago | 1

Answered
What is the best option to import individual columns from text files?
hello see suggestion below you can expand on this code to add a condition statement on the file counts to switch from 3rd t...

2 månader ago | 1

Answered
Plotting two graphs simultaneously in a for loop
hello using your x and y data , see answer (example) below : %% create animatedline object / handle figure h1 = animatedli...

2 månader ago | 0

Answered
ECG signal baseline drift correction
hello a simple high pass filter suffices %--Load Real signal--% load ('100m.mat'); RealECG = val/200; Fs = 360; % Hz L ...

2 månader ago | 0

Answered
Running 4 MATLAB Scripts to read, process and plot data from many csv files
hello see example below clc clearvars %% define path yourpath = pwd; % or your specific path list=dir(yourpath); %get ...

2 månader ago | 1

| accepted

Answered
How to plot time with correlation of two matrix?
hello here you are : A=[1 2 3 4;4 6 5 7; 1 8 9 3; 1 2 3 4; 3 2 4 1; 4 3 2 1; 5 6 7 4]; B=[0 1 2 3;3 5 5 7; 2 9 9 3; 2 3 4 4...

2 månader ago | 0

| accepted

Answered
How to add a verteical pad obove and below the curve and graph style and color displays?
hello Nisar this is my suggestion , and result your last mat file does not contain the f data so I skipped that portion of co...

2 månader ago | 0

Answered
How to read all mat files in folder and save plot as image
hello you can try / build your solution based on this example here I wanted all data being in one single plot so I concatenat...

2 månader ago | 0

Answered
model fit comparison matlab
hello this is basically waht is called the R² correlation coefficient . If it get's close to 1 it's a good fit, if it get's cl...

2 månader ago | 0

Answered
How to replicate this graph with random peaks?
hello see little demo below , based on random data (up to you to specify x, y centers , sigmas and z amplitudes ) here I gen...

2 månader ago | 0

Answered
Import Labview Text file with lines of text above a two column data set
hello there are 10 header lines in your file (attached for double check) code is simply : >> data = readmatrix('Data.txt',...

3 månader ago | 0

Answered
plotting 3 figures in a single figure when they are in loop
hello see my suggestion below (based on dummy data as you don't supply any file) notice that to compute the velocity and acc...

3 månader ago | 0

| accepted

Answered
How to sum of loop elements?
hello I opted for a bar graph of the summed data I changed the Y scale to log otherwise you could not see the tiny values as...

3 månader ago | 0

Answered
Move all statements after the function definition to before the first local function definition
hello put all functions at the end , after the main code this works now : clear all; close all; clc; % calculate alpha m ...

3 månader ago | 0

| accepted

Answered
Data analysis from measurements (PRBS injected to a system -> how to plot the bode of the system response)
hello see my suggestion below (data in attachement) clc clearvars data = load('beam_experiment.mat'); x = transpose(data...

3 månader ago | 1

| accepted

Answered
How to convert to nan
hello try this FF= [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15]; [i,j] = find(FF > 0 & FF < 10); FF(i,j) = NaN;

3 månader ago | 0

Answered
How is frequency response calculated as function of sample data frequency?
hello so h is a FIR filter see code below for Bode plot and time domain simulation on sine wave at 30 and 25 Hz (the notch f...

3 månader ago | 0

Answered
Drift in cumtrapz forceplate data
hello yet another example of accelerometer / signal integration drift using cumtrapz. I see you removed the mean value of th...

3 månader ago | 0

| accepted

Answered
How to find the index of the first absolute minimum entry of a matrix
hello here you are my friend A=[5,7,0.5,5 ; 2,0.5,4,1 ; 0.5,6,7,9] [val,ind_linear] = min(A,[],'all','linear'); % M = ...

3 månader ago | 0

Answered
Summation with for LOOP
hello a simple add on to your code : clear clc x = linspace(0,50,1000); v = 10; a = 0.2254; b = 0.5401; xT = 0; ysum =...

3 månader ago | 0

| accepted

Load more