Answered
How to choose stopband ripple and passband ripple of filter for High pass filter
hello why not start with simpler filters like butterworth or bessel filters ? . If you don't have any specific requirement ...

5 years ago | 1

| accepted

Answered
How can I handle the signal of the data read from the serial port
hello if you are able to store the data in a file (txt or mat or ..) you can adapt this code I developped for audio processing...

5 years ago | 1

Answered
How to add low frequency noise to the signal?
hello this is a simple demo showing a sine signal corrupted by a low frequency noise . You can adjust the parameters to your o...

5 years ago | 0

| accepted

Answered
Reading multiple non-sequential *.txt files containing both text and numbers
hello this is an example that shows how I could read one then multiple text files (and applying a natural name sorting) you ...

5 years ago | 0

| accepted

Answered
pulse train with gaussian pulses in an irregular interval
hello a quick and dirty demo , not using gauspuls but that could be easily done also clc clearvars f0 = 50; % pulse freq...

5 years ago | 0

| accepted

Answered
Time Series Partitioning of EMG data
hello see example below : samples = 40000; buffer = 2000; data = rand(samples,1)+10*((1:samples)/samples)'; % noisy ramp...

5 years ago | 0

| accepted

Answered
how can I know the sence of voice that was recorded in a special place?
hello I interpret your request about how to analyse your records - assuming you can use audioread from matlab , here 's a cod...

5 years ago | 0

Answered
How to save multiple output?
hello I would recommend to use structures (indexed) like in this example a =randperm(18); b=reshape(a,9,2); vals=b; [m,n...

5 years ago | 1

| accepted

Answered
use regexp to extract index
hello my 2 cents suggestion using readlines and working on strings : this simple code can be expanded / modified according t...

5 years ago | 1

| accepted

Answered
How to update title of plot without it "wiggling"
hello my 2 cents suggestion : plot(rand(1,10),rand(1,10)) t = repmat([0 10],1,5); for k = 1:length(t) above10= t(k) -...

5 years ago | 0

Answered
Determine less than in for loop
hello does that reflect what you wanted to do ? clc clearvars % x = round(100*rand(1,10)); x = [11 96 0 77 ...

5 years ago | 0

| accepted

Answered
read a .txt file
hello have you tried to work with tables - using readtable ? filename = '0-3000.txt'; T = readtable(filename); C = table2c...

5 years ago | 0

| accepted

Answered
Error while plotting the surface
hello you need to create a grid from the 1D array x and y . This is done via meshgrid code : clc clearvars x = 0:1:100;...

5 years ago | 0

Answered
for loop stack the data
hello my suggestion if M is (like here) a 1D array so the col saved is always one; this can be removed from the code if ne...

5 years ago | 0

| accepted

Answered
How to set level values of a variable in a nc file
hello again3 so I tried to a few things to get the min and max points of the data and display them (the big crosses) I am stil...

5 years ago | 1

| accepted

Answered
How to add correlation factor to the plot?
hello see my little example below (your code does not show how you get the linear model fit data) clc clearvars % dummy...

5 years ago | 0

| accepted

Answered
read special cell in excel file
hello again so here a small code to extract the lines where the 2 numbers in row 2 and row 3 are below a given threshold. FYI ...

5 years ago | 0

| accepted

Answered
Finding end of words in signal
hello you should first compute the envelope of your signal (for example using the function of same name envelope) simply do a...

5 years ago | 1

| accepted

Answered
How to adapt a function to a change of two points?
hello Daniel this is my suggestion - a simple anamorphosis of the curve along the vertical axis (= a vertical shift and a multi...

5 years ago | 0

| accepted

Answered
How do I create array of a function with for loop?
hello it's not the best coding practice, but it works ... clc clearvars % dummy data X1 = rand([424,412]); X2 = rand([4...

5 years ago | 1

Answered
How to plot power of wavelet transform.
hello again I simply run your code using the appropriate package the package and results are in the zip attached # Cross...

5 years ago | 0

| accepted

Answered
how to receive power values in and out the cone of influence in wavelet transform.
hello I assume this is related to your previous post How to plot power of wavelet transform. - MATLAB Answers - MATLAB Centr...

5 years ago | 0

Answered
The graphs of position, velocity and acceleration are wrong.
hello I didn't find any mistake in your original equations , but I am lazy and I found your code quite long and complicated......

5 years ago | 1

| accepted

Answered
Saving multiple plots into one folder with the specified figure name in code to jpg form
hello why not simply add this line of code after each figure : adjust the resolution to your needs (here 140 DPI) print('-dj...

5 years ago | 0

Answered
Attempting to detrend and remove noise from surface roughness data
hello my prefered function for smoothing data is smoothdata , but there are other options example below : clc close all ...

5 years ago | 0

Answered
Generating some sounds and present all of the sound randomly to left and right ear
hello again we need to clarify a bit the data you generate (see my comment above) , but basically this is your code a bit modif...

5 years ago | 1

| accepted

Answered
How to turn a code into a function while one of the input is string
hello Reza see my suggestion below A is now a cell array I added a structure param to easily pass the various coefficients ...

5 years ago | 0

| accepted

Answered
I'm trying to use loop function and want to cut my code short, and my end goal is to compare idle components from 7 idle machines, from an excel data, I'm not sure how to do
hello as far as I understand your request , this is a modified code (see below) i splitted a main section and a subfunction s...

5 years ago | 0

| accepted

Answered
Index exceeding number of array elements on second iteration of loop
hello your variables are not indexed , so this is no surprise that it will fail at the second iteration code should be , ass...

5 years ago | 0

Answered
Extracting specific data from multiple excel files and create a single matrix from those
hello this is one example if you want to work out the entire folder I assumed it would be numeric data so I used importdata (...

5 years ago | 1

| accepted

Load more