Answered

How to constraint the values of fitted parameters with lsqcurvefit?

hello I admit, my solution is the "poor man" solution as I don't have the optimization toolbox. But even with fminsearch I cou...

How to constraint the values of fitted parameters with lsqcurvefit?

hello I admit, my solution is the "poor man" solution as I don't have the optimization toolbox. But even with fminsearch I cou...

5 månader ago | 0

Answered

How to calculate the width where the intensity is higher than 20% of the maximum intensity?

hello Angelo I have no doubt you can use findpeaks but sometimes I prefer my own way. see demo below - this is to find W20...

How to calculate the width where the intensity is higher than 20% of the maximum intensity?

hello Angelo I have no doubt you can use findpeaks but sometimes I prefer my own way. see demo below - this is to find W20...

5 månader ago | 0

| accepted

Answered

how harmonic estimation using DFT ?

hello yu can take example on the code below (averaged fft spectrum and spectrogram (this my not be your main focus right now))...

how harmonic estimation using DFT ?

hello yu can take example on the code below (averaged fft spectrum and spectrogram (this my not be your main focus right now))...

5 månader ago | 0

Answered

Math Moron here in need of a function to simulate a degrading curve over time.

hello maybe this ? (the idea behind is a sigmoid) samples = 100; c = samples/2; % center of the curve (c corresponds to ...

Math Moron here in need of a function to simulate a degrading curve over time.

hello maybe this ? (the idea behind is a sigmoid) samples = 100; c = samples/2; % center of the curve (c corresponds to ...

5 månader ago | 0

| accepted

Answered

How to extract column in particular interval from original matrix and to form new matrix?

hello I guess you mean you want to downsample your data by a factor 4 ; you can of course simply pick one every four sample , ...

How to extract column in particular interval from original matrix and to form new matrix?

hello I guess you mean you want to downsample your data by a factor 4 ; you can of course simply pick one every four sample , ...

5 månader ago | 0

Answered

Variable vs constant frequency analysis

hello see my little demo below - no need for fft , I simply compute the cycle by cycle period (by crossing detection) on two s...

Variable vs constant frequency analysis

hello see my little demo below - no need for fft , I simply compute the cycle by cycle period (by crossing detection) on two s...

5 månader ago | 0

| accepted

Answered

i need to find error in code because I it's increasing but it should be decresing

hi seems you have swapped the x and y data when you do the plot after the fix we get this : full code a bit improved : ...

i need to find error in code because I it's increasing but it should be decresing

hi seems you have swapped the x and y data when you do the plot after the fix we get this : full code a bit improved : ...

5 månader ago | 0

Answered

what's the code inside angle2dcm?

hello here you are notice that there are some issues / questions about orientation convention with this function angle2dcm3(...

what's the code inside angle2dcm?

hello here you are notice that there are some issues / questions about orientation convention with this function angle2dcm3(...

5 månader ago | 0

| accepted

Answered

Issue with magnitude of cumtrapz and integration of second order system acceleration data

hello accelerometer's signals double integration can be a bit tricky. We must compromise between being as accurate as possible...

Issue with magnitude of cumtrapz and integration of second order system acceleration data

hello accelerometer's signals double integration can be a bit tricky. We must compromise between being as accurate as possible...

5 månader ago | 0

| accepted

Answered

Read the third column of a .csv file

hello you can use the import wizard to help you create the right import options for readtable see demo below - temperature is...

Read the third column of a .csv file

hello you can use the import wizard to help you create the right import options for readtable see demo below - temperature is...

5 månader ago | 0

| accepted

Answered

Plot two figures simultaneously

hi my suggestion with subplots close all clear all clc format long %% Data Layup Layup = [90 0 0 45 -45 0 0 -45 45 0 0 9...

Plot two figures simultaneously

hi my suggestion with subplots close all clear all clc format long %% Data Layup Layup = [90 0 0 45 -45 0 0 -45 45 0 0 9...

5 månader ago | 1

Answered

I need help plotting

hello this is the correct code Uan and Uab needs to be 2D arrays (n rows and columns as many as length(t)) also some missin...

I need help plotting

hello this is the correct code Uan and Uab needs to be 2D arrays (n rows and columns as many as length(t)) also some missin...

5 månader ago | 1

| accepted

Answered

Plot spectrogram plot just like pre 2015

hello specgramdemo was a really nice piece of code. It will be quite serious work to rebuild the whole thing otherwise , att...

Plot spectrogram plot just like pre 2015

hello specgramdemo was a really nice piece of code. It will be quite serious work to rebuild the whole thing otherwise , att...

5 månader ago | 1

| accepted

Answered

Extract maxima of a fitted curve

hello your code cannot be run because you did not provide prepareCurveData function and the data U_axis, U [xData, yData] =...

Extract maxima of a fitted curve

hello your code cannot be run because you did not provide prepareCurveData function and the data U_axis, U [xData, yData] =...

5 månader ago | 1

| accepted

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

5 månader 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...

5 månader 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....

6 månader 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 ...

6 månader 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...

6 månader 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; ...

6 månader 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...

6 månader 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...

6 månader 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...

6 månader 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...

6 månader 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; %...

6 månader 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...

6 månader 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)); ...

6 månader 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...

6 månader 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...

6 månader 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 ...

6 månader ago | 0

| accepted