Answered

impulse response with the commande lsim

hello your first implementation is a discrete time impulse For discrete-time systems, the impulse response is the response to...

impulse response with the commande lsim

hello your first implementation is a discrete time impulse For discrete-time systems, the impulse response is the response to...

22 dagar ago | 0

| accepted

Answered

How to load multiple files and calculate value for each file (with same formula)

hello this is the code (principle) to load all the mat files in a loop % use the structure returned by DIR: P = cd; % worki...

How to load multiple files and calculate value for each file (with same formula)

hello this is the code (principle) to load all the mat files in a loop % use the structure returned by DIR: P = cd; % worki...

22 dagar ago | 0

Answered

i have a single row vector contains 0s and 1s and want to convert every 3 bits into integer how can i do that??

hello see below hope it helps % dummy data nbits = 3; samples = 8; x = round(rand(1,nbits*samples)); nbits_vect = 2....

i have a single row vector contains 0s and 1s and want to convert every 3 bits into integer how can i do that??

hello see below hope it helps % dummy data nbits = 3; samples = 8; x = round(rand(1,nbits*samples)); nbits_vect = 2....

25 dagar ago | 0

| accepted

Answered

How to read a text file and save it as different variables

hello I saved you short text from the post in a file and started some coding nota this code contains also an alternative to ...

How to read a text file and save it as different variables

hello I saved you short text from the post in a file and started some coding nota this code contains also an alternative to ...

26 dagar ago | 0

| accepted

Answered

Hello I need a code that gives me the local minimum of a histogram please ?

hello maybe this the local minima are the red diamonds x = randn(1000,1); h = histogram(x); Values = h.Values; Bin...

Hello I need a code that gives me the local minimum of a histogram please ?

hello maybe this the local minima are the red diamonds x = randn(1000,1); h = histogram(x); Values = h.Values; Bin...

26 dagar ago | 0

Answered

Generating spike using decaying exponential sinusoid of frequency 10^7Hz

hello try this code ; I guessed the pattern period about 0.01 second but you can of course modify it Fs = 1e7; dt = 1/Fs; ...

Generating spike using decaying exponential sinusoid of frequency 10^7Hz

hello try this code ; I guessed the pattern period about 0.01 second but you can of course modify it Fs = 1e7; dt = 1/Fs; ...

26 dagar ago | 0

| accepted

Answered

How to plot data for hundreds of rows in MATLAB?

hello mamma mia ! You are not using matlab capabilities to do math on arrays ... there is much simpler ways to do all this stu...

How to plot data for hundreds of rows in MATLAB?

hello mamma mia ! You are not using matlab capabilities to do math on arrays ... there is much simpler ways to do all this stu...

26 dagar ago | 1

| accepted

Answered

How to add the signals according to time?

hello try this (i made a few mods , see the comments) clc; close all; clear all; % In one x axis, from 0 to 0.3 seconds...

How to add the signals according to time?

hello try this (i made a few mods , see the comments) clc; close all; clear all; % In one x axis, from 0 to 0.3 seconds...

26 dagar ago | 0

| accepted

Answered

Put cell array data into txt file

hello try this % writing dates to output file fid = fopen('output.txt','w'); fprintf(fid,'%s\n',H{:}); fclose(fid); % ch...

Put cell array data into txt file

hello try this % writing dates to output file fid = fopen('output.txt','w'); fprintf(fid,'%s\n',H{:}); fclose(fid); % ch...

26 dagar ago | 1

Answered

How to loop multi-line with data text?

hello again try this code - does not require readlines line_index will give you which line contains the searched string filen...

How to loop multi-line with data text?

hello again try this code - does not require readlines line_index will give you which line contains the searched string filen...

27 dagar ago | 1

| accepted

Answered

How to count active faults in a specific time interval

hello try this code ; it select segments of data above a given threshold and longer than min_contiguous_samples samples; %...

How to count active faults in a specific time interval

hello try this code ; it select segments of data above a given threshold and longer than min_contiguous_samples samples; %...

27 dagar ago | 0

| accepted

Answered

full width, half max

hello the attached code can work but is limted in terms of accuracy (will depend how fine is sampled the data) I would sugges...

full width, half max

hello the attached code can work but is limted in terms of accuracy (will depend how fine is sampled the data) I would sugges...

28 dagar ago | 0

| accepted

Answered

Pcolor of a time-series

hello I suspect this is the intention - demo on "dummy" data % dummy data dt = (1:3285)'; data1 = single(rand(3285,1)); ...

Pcolor of a time-series

hello I suspect this is the intention - demo on "dummy" data % dummy data dt = (1:3285)'; data1 = single(rand(3285,1)); ...

ungefär en månad ago | 0

Answered

Fourier Analysis on a Damped Harmonic Oscillator

hello I improved a bit the firts section of your code but I don't get what you are trying to do wit the second portion of the...

Fourier Analysis on a Damped Harmonic Oscillator

hello I improved a bit the firts section of your code but I don't get what you are trying to do wit the second portion of the...

ungefär en månad ago | 0

Answered

Why is my projectile motion code only working at certain input angles.

hello made a for loop on angles to test the code (for one given V velocity) and it worked as soon as I put the "clear x y" li...

Why is my projectile motion code only working at certain input angles.

hello made a for loop on angles to test the code (for one given V velocity) and it worked as soon as I put the "clear x y" li...

ungefär en månad ago | 1

Answered

Transform rows to columns and add them at the end

hi simply this : >> a = [1 2 3 ; 4 5 6; 7 8 9]; >> a(:) ans = 1 4 7 2 5 8 ...

Transform rows to columns and add them at the end

hi simply this : >> a = [1 2 3 ; 4 5 6; 7 8 9]; >> a(:) ans = 1 4 7 2 5 8 ...

ungefär en månad ago | 0

| accepted

Answered

Colorbar with equal ticks between two power exponentials

hi try this figure xt = linspace(0,log10(3e10),7); col = colorbar('XTickLabel', {'0', '0.5 x 10^{10}', '1 x 10^{10}', '1.5 ...

Colorbar with equal ticks between two power exponentials

hi try this figure xt = linspace(0,log10(3e10),7); col = colorbar('XTickLabel', {'0', '0.5 x 10^{10}', '1 x 10^{10}', '1.5 ...

ungefär en månad ago | 0

| accepted

Answered

merge three barh (stacked)

hello Rachele try this ! you get now one figure (plot) per variable , 20 in total) all the best t = readcell('Cartel2.x...

merge three barh (stacked)

hello Rachele try this ! you get now one figure (plot) per variable , 20 in total) all the best t = readcell('Cartel2.x...

ungefär en månad ago | 1

Answered

Plot cell data from for loop

hello maybe this ? I replaced the " mean(vertcat(y{:,r,m,ind}),1) " by a simple random number clc clearvars outLoop...

Plot cell data from for loop

hello maybe this ? I replaced the " mean(vertcat(y{:,r,m,ind}),1) " by a simple random number clc clearvars outLoop...

ungefär en månad ago | 0

| accepted

Answered

How to generate random broadband vibration signal for certain frequency range ?

hello here you are my friend ! Fs = 500; % sampling rate duration = 10; % seconds rms_amplitude = 0.4; samples = Fs*du...

How to generate random broadband vibration signal for certain frequency range ?

hello here you are my friend ! Fs = 500; % sampling rate duration = 10; % seconds rms_amplitude = 0.4; samples = Fs*du...

ungefär en månad ago | 0

Answered

Area under a peak

hello based on @Davide Masiello excellent proposition, I tried to make the selection of the peak zone a bit more automatic... ...

Area under a peak

hello based on @Davide Masiello excellent proposition, I tried to make the selection of the peak zone a bit more automatic... ...

ungefär en månad ago | 2

Answered

Sawtooth that has 2 different times

hello here is the correct answer : T = 25e-3; % signal duration = 25 ms amplitude = 0.4; fs = 10000; % ts = 0.1 ms t = ...

Sawtooth that has 2 different times

hello here is the correct answer : T = 25e-3; % signal duration = 25 ms amplitude = 0.4; fs = 10000; % ts = 0.1 ms t = ...

ungefär en månad ago | 0

Answered

find the minmum value in each column of a matrix

hello try this : d=[ 0 10.1164 0 0 0; 11.4474 0 0 ...

find the minmum value in each column of a matrix

hello try this : d=[ 0 10.1164 0 0 0; 11.4474 0 0 ...

ungefär en månad ago | 0

Answered

Cannot perform FFT on a signal imported from Simulink

hello again the issue was that the signal start with a NaN value removing this first sample would solve all your issue. maybe...

Cannot perform FFT on a signal imported from Simulink

hello again the issue was that the signal start with a NaN value removing this first sample would solve all your issue. maybe...

ungefär en månad ago | 0

Answered

Automatic Signal denoising and segmenting for feature extraction

hello this is a code to implement a 4th order bandpass filter (and plot the fft spectrum of the signal before and after filter...

Automatic Signal denoising and segmenting for feature extraction

hello this is a code to implement a 4th order bandpass filter (and plot the fft spectrum of the signal before and after filter...

ungefär en månad ago | 0

| accepted

Answered

find multiples of real number in sampled array

hello I had some code laying around and found it could be used for your purpose (the sine wave problem , and btw i could not r...

find multiples of real number in sampled array

hello I had some code laying around and found it could be used for your purpose (the sine wave problem , and btw i could not r...

ungefär en månad ago | 1

Answered

Adding additional column into the array

hello simply this Anew = [A B(:,5)];

Adding additional column into the array

hello simply this Anew = [A B(:,5)];

ungefär en månad ago | 0

Answered

How to arrange the correct range in colorbar in MATLAB

hello as I don't have the toolbox for fit, I used instead the FEX submission (excellent) from John D'Errico : polyfitn - Fil...

How to arrange the correct range in colorbar in MATLAB

hello as I don't have the toolbox for fit, I used instead the FEX submission (excellent) from John D'Errico : polyfitn - Fil...

ungefär en månad ago | 0

| accepted

Answered

Plotting SPL(dBA) from an audio WAV file?

hello Zhu no problem, I'll try to answer as precisely as possible the amplitude is negative because the dB scale is the log of...

Plotting SPL(dBA) from an audio WAV file?

hello Zhu no problem, I'll try to answer as precisely as possible the amplitude is negative because the dB scale is the log of...

ungefär en månad ago | 2

| accepted

Answered

How do I iterate through a line while skipping a set number of values from the beginning of the line?

hello maybe this code could be of some help (to extract snipsets of data based on threshold comparison with running rms value ...

How do I iterate through a line while skipping a set number of values from the beginning of the line?

hello maybe this code could be of some help (to extract snipsets of data based on threshold comparison with running rms value ...

ungefär en månad ago | 0