Answered

Subtract 1 from variable each second

hi nothing fancy counter = 100; while true do_something=true; counter = counter -1; % decrement counter pause...

Subtract 1 from variable each second

hi nothing fancy counter = 100; while true do_something=true; counter = counter -1; % decrement counter pause...

2 months ago | 0

Answered

How to plot this figure?

hu try this and adapt to your own needs a = rand(300,3); figure,imagesc(a);colormap('jet');colorbar

How to plot this figure?

hu try this and adapt to your own needs a = rand(300,3); figure,imagesc(a);colormap('jet');colorbar

2 months ago | 0

| accepted

Answered

Noisy plot after deviation (no sensor)

hello my suggestion, with some smoothing at all stages : z_irl = readmatrix('z_irl_data.txt'); z_irls = smoothdata(z_irl,'g...

Noisy plot after deviation (no sensor)

hello my suggestion, with some smoothing at all stages : z_irl = readmatrix('z_irl_data.txt'); z_irls = smoothdata(z_irl,'g...

2 months ago | 0

| accepted

Answered

Trying to find out that how many loop cycle it complete before the 'S' become zero. S value is not decreasing. Need to decrease S value zero and sum the total cycle number?

hello again so I made 2 modifications initialized F with 0 (my guess) changed the while tolerance limit because otherwise i...

Trying to find out that how many loop cycle it complete before the 'S' become zero. S value is not decreasing. Need to decrease S value zero and sum the total cycle number?

hello again so I made 2 modifications initialized F with 0 (my guess) changed the while tolerance limit because otherwise i...

2 months ago | 0

Answered

in my program, i retrieve .csv data using load, but why is there an error when retrieving the data? . anyone can help me?

hello again it worked fine with readtable , here I simply plot the first variable of the table and it's min value T = readtab...

in my program, i retrieve .csv data using load, but why is there an error when retrieving the data? . anyone can help me?

hello again it worked fine with readtable , here I simply plot the first variable of the table and it's min value T = readtab...

2 months ago | 0

Answered

Plotting acceleration vs time on Matlab from accelerometer data that doesn't have a time column

hello as we know the sampling rate Fs and the amount of samples , there is no big difficulty to reconstruct a time vector : ...

Plotting acceleration vs time on Matlab from accelerometer data that doesn't have a time column

hello as we know the sampling rate Fs and the amount of samples , there is no big difficulty to reconstruct a time vector : ...

2 months ago | 0

Answered

How to draw a line of best fit on filtered discrete data sets

I used this simple example and created a gap in the data (not NaN's) there is no problem to use polyfit in that situation ...

How to draw a line of best fit on filtered discrete data sets

I used this simple example and created a gap in the data (not NaN's) there is no problem to use polyfit in that situation ...

2 months ago | 0

| accepted

Answered

Deriving an average loop waveform from multiple loops

So finally after some attempts and headaches , a positive result emerged this is it and the code that generated it - there i...

Deriving an average loop waveform from multiple loops

So finally after some attempts and headaches , a positive result emerged this is it and the code that generated it - there i...

2 months ago | 0

| accepted

Answered

How to find a frequency of a chirp signal at each sampling point

hello this code will plot the period (and from there the frequency) between two consecutive "zero crssing" points see second...

How to find a frequency of a chirp signal at each sampling point

hello this code will plot the period (and from there the frequency) between two consecutive "zero crssing" points see second...

2 months ago | 0

| accepted

Answered

Fitting Gaussian keeping max amplitude same

hello robust smoothing can help you see code below clc clearvars %--- Example #1: smooth a curve / narrow peaks remov...

Fitting Gaussian keeping max amplitude same

hello robust smoothing can help you see code below clc clearvars %--- Example #1: smooth a curve / narrow peaks remov...

2 months ago | 1

Answered

Filter amplitude data as a function of time, calculating the time difference

hello Ignacio see figure(2) results result is displayed in command window : time distance dt = 440.9509 s at threshold val...

Filter amplitude data as a function of time, calculating the time difference

hello Ignacio see figure(2) results result is displayed in command window : time distance dt = 440.9509 s at threshold val...

2 months ago | 0

Answered

Plotting data from a matrix: Showing shaded area on graph

hello Isabella this is my suggestion and how it looks as a plot you may have to tweka the labels / titles etc ... hope it h...

Plotting data from a matrix: Showing shaded area on graph

hello Isabella this is my suggestion and how it looks as a plot you may have to tweka the labels / titles etc ... hope it h...

2 months ago | 0

| accepted

Answered

Color gradient for graph in a for loop

hello this would be my suggestion , gray dark to light for one curve I wonder if you overlay 3 curves at each iteration if it...

Color gradient for graph in a for loop

hello this would be my suggestion , gray dark to light for one curve I wonder if you overlay 3 curves at each iteration if it...

2 months ago | 0

| accepted

Answered

bar plot with different color bars depending on height

hello Giannis see code below and ouput here : clc clearvars x = [1:10]; y= [13, 25, 34, 65, 78, 92, 54, 46, 39, 5]; ...

bar plot with different color bars depending on height

hello Giannis see code below and ouput here : clc clearvars x = [1:10]; y= [13, 25, 34, 65, 78, 92, 54, 46, 39, 5]; ...

2 months ago | 0

| accepted

Answered

concatenate repeating digit to the end of a column in numeric matrix

hello so my 2 cents suggestion, build on @DGM input (tx to him ! ) it just needed an additionnal correction term to be perfec...

concatenate repeating digit to the end of a column in numeric matrix

hello so my 2 cents suggestion, build on @DGM input (tx to him ! ) it just needed an additionnal correction term to be perfec...

2 months ago | 0

| accepted

Answered

how can I concatenate [aa,bb]?

hello I believe there are a frew mistakes as aa and bb are not indexed in the for loops , so you have a scalar that will be ov...

how can I concatenate [aa,bb]?

hello I believe there are a frew mistakes as aa and bb are not indexed in the for loops , so you have a scalar that will be ov...

2 months ago | 0

| accepted

Answered

How to draw such plot

helllo simply like this (one curve demo) % 3 storey plot x = [ 1 1 2 2 3 3]; y = [5000 4000 4000 3000 3000 2000]; p...

How to draw such plot

helllo simply like this (one curve demo) % 3 storey plot x = [ 1 1 2 2 3 3]; y = [5000 4000 4000 3000 3000 2000]; p...

2 months ago | 0

Answered

Hello everyone. How to make a matrix with unequal number of rows and columns, and make the number of rows and columns the same by adding zeros. Thank you very much.

hello see example code below clearvars; load('dataA.mat') [m,n] = size(dataA); if m>=n out = zeros(m,m); out(...

Hello everyone. How to make a matrix with unequal number of rows and columns, and make the number of rows and columns the same by adding zeros. Thank you very much.

hello see example code below clearvars; load('dataA.mat') [m,n] = size(dataA); if m>=n out = zeros(m,m); out(...

2 months ago | 0

Answered

gaussian chirp signal generation

hello Maj I fixed your code and improve a bit the x axis time display (all plots are centered around t = 0 ) the major problem...

gaussian chirp signal generation

hello Maj I fixed your code and improve a bit the x axis time display (all plots are centered around t = 0 ) the major problem...

2 months ago | 0

Answered

Extracting a double from a text file

hello my 2 cents suggestion (as I still struggle with regexp !) bs = split(fileread('data.txt')); values = bs(find(strcmp(...

Extracting a double from a text file

hello my 2 cents suggestion (as I still struggle with regexp !) bs = split(fileread('data.txt')); values = bs(find(strcmp(...

2 months ago | 0

| accepted

Answered

Be able to Detect Breathing

hello David yes you can clear tell that the bed is not empty and that someone is actually breathing by either saying the time ...

Be able to Detect Breathing

hello David yes you can clear tell that the bed is not empty and that someone is actually breathing by either saying the time ...

2 months ago | 0

| accepted

Answered

Is there a way to smoothen the function/"bridge the gap"?

hello this would be me suggestion if the idea is to replace the "faulty" data segment with a piecewise linear segment and then...

Is there a way to smoothen the function/"bridge the gap"?

hello this would be me suggestion if the idea is to replace the "faulty" data segment with a piecewise linear segment and then...

2 months ago | 0

| accepted

Answered

how to inser loop in equations

hello in matlab , index are starting with 1 (it's not a zero based language) - so your code will not work for i = 1 I made a...

how to inser loop in equations

hello in matlab , index are starting with 1 (it's not a zero based language) - so your code will not work for i = 1 I made a...

2 months ago | 0

| accepted

Answered

How can I write a table to .csv file

hello for numerical data you can use writematrix - see example below writematrix(rand(100,5),"file.csv","Delimiter",",")

How can I write a table to .csv file

hello for numerical data you can use writematrix - see example below writematrix(rand(100,5),"file.csv","Delimiter",",")

2 months ago | 0

Answered

Jacobi iterative method in matlab

hello there were quite a few bugs there - now see the correction below you should do a while and not a for loop if you sto...

Jacobi iterative method in matlab

hello there were quite a few bugs there - now see the correction below you should do a while and not a for loop if you sto...

2 months ago | 0

| accepted

Answered

How to change the unit of magnitude from DB to m/s2 in stft plot ?

hello value_ms2 = 10.^(value_dB/20)

How to change the unit of magnitude from DB to m/s2 in stft plot ?

hello value_ms2 = 10.^(value_dB/20)

2 months ago | 0

| accepted

Answered

How to read this mtx file in matlab

hello this is a txt file with 3 columns and 1 header line see example below % demo clc clearvars; % % load data %...

How to read this mtx file in matlab

hello this is a txt file with 3 columns and 1 header line see example below % demo clc clearvars; % % load data %...

2 months ago | 0

Answered

plotting figure ignore blank entries

hello remove first the empty cells , example below (R is the cell array) R = R(~cellfun('isempty',R)); plot(cell2mat(R))

plotting figure ignore blank entries

hello remove first the empty cells , example below (R is the cell array) R = R(~cellfun('isempty',R)); plot(cell2mat(R))

2 months ago | 0

Answered

Denoising the sinusoidal signal

hello see my suggestion below notice that your code was wrong regarding sampling frequency (barely at 5 Hz) so this is not ...

Denoising the sinusoidal signal

hello see my suggestion below notice that your code was wrong regarding sampling frequency (barely at 5 Hz) so this is not ...

2 months ago | 0

Answered

Applying bessel filter to raw data to reduce the noise (error)

hello here you are my friend; bessel are continuous filters that must be converted to digital (a contrario from butter that ge...

Applying bessel filter to raw data to reduce the noise (error)

hello here you are my friend; bessel are continuous filters that must be converted to digital (a contrario from butter that ge...

2 months ago | 0