Answered
Aplly average to a set of data
This seems to be a slightly different version of your earlier Question: Plot data from txt file. This does the same thing,, e...

3 years ago | 0

| accepted

Answered
Alternating between if conditions in a loop.
I am not dertain what you want to do. I would use either findpeaks (with normal and negated arguments to get the peaks and trou...

3 years ago | 0

Answered
How to calculate FWHM on the graph
Try this — LD1 = load('xstats.mat'); xstats = LD1.xstats LD2 = load('ystats.mat'); ystats = LD2.ystats F = openfig('gr...

3 years ago | 0

| accepted

Answered
How to calculate FWHM on the point
Those fields do not exist in ‘stats.mat’ so those are empty vectors and the error is obvious. This works — LD = load('stats...

3 years ago | 0

Answered
Apply apodization to NMR spectra
I am not certain what you want to do. (I had to look up ‘Apodization’ and discovered that in the context of Fourier transforms,...

3 years ago | 0

Answered
fmindnd problem doesnt run
It runs here — g=9.81;zo=50;vo=15;m=50;c=13; z=@(t) -(zo+m/c*(vo+m*g/c)*(1-exp(-c/m*t))-m*g/c*t); [xmin fval]=fminbnd(z,0,8)...

3 years ago | 0

Answered
How to enter multiple parameter estimations in a single genetic algorithm (GA)
This works. I will let you tweak it to give the appropriate results, since I have no idea what system you are modeling. I ha...

3 years ago | 0

| accepted

Answered
organize the inside of the .txt file
Define the delimiter in your writetable call to be the tab '\t' character — type('data.txt') type('data_new.txt') T1 = rea...

3 years ago | 0

| accepted

Answered
How to filter an EEG signal from eye blinking, electrodes movement and calculate the evoked potential?
The EEG signal does not need filtering. It is not significantly noisy, and it is obvious that a 50 Hz mains interference peak h...

3 years ago | 0

Answered
Drift correction for geochemical data
First, plot the data — fiji = readmatrix('fiji.csv') Col1 = fiji(:,1) Col4 = fiji(:,4) % d4d1 = gradient(fiji(:,4)) ./ gr...

3 years ago | 0

| accepted

Answered
How to Remove the baseline wander from ECG?
I recognise my code, however that version was not intended to work with a signal such as yours. Try this instead — load sig...

3 years ago | 0

| accepted

Answered
Three different graph on the same figure
I am not certain from your description what you want. The subplot, tiledlayout and stackedplot functions may be appropriate. ...

3 years ago | 0

Answered
subplot with 1 large and 2 small figures
Perhaps something like this — x = 0:0.01:6.2; figure subplot(2,2,[1 2]) plot(x, sin(2*pi*4*x)) subplot(2,2,3) plot(x, c...

3 years ago | 2

| accepted

Answered
Create waterfall with separated curve
Perhaps something like this — X = 0:555; Y = 1:8; Z = X(:)*Y*1E-2 + randn(numel(X),numel(Y)); figure waterfall(X,Y,Z.') ...

3 years ago | 0

| accepted

Answered
Help with "Error using / Matrix dimensions must agree."
Use element-wise division, so (./) instead of (/) — Air_desnity=[0.646:0.01:1.225]; W_412_MTOW=5534; A_412=153.93804; Power...

3 years ago | 0

| accepted

Answered
Calculate RR from ECG signals
A somewhat more direct approach — EKG = readmatrix('ecg.txt'); L = numel(EKG) Fs = 500; ...

3 years ago | 1

Answered
accessing subplot grid title (sgtitle) from figure properties
The sgtitle object is a child of the figure. The problem is that it doesn’t appear straightforward to access using findobj. ...

3 years ago | 1

| accepted

Answered
Fill the space between y-axis and curve with colours
It would be easiest to produce a series of patch plots for this, especially since the colours have to alternate. Example — ...

3 years ago | 0

| accepted

Answered
Find the first matched string/value from a table
One approach — VN = {'StepNum' 'Activity' 'TypeNum'}; step = [5098 5099 5101 5105 5106 5107 5113 ...

3 years ago | 0

| accepted

Answered
How to format individual elements in a timeseries
The various table arrays inherit their formats from the existing format. The only way to force a specific format is to write th...

3 years ago | 0

| accepted

Answered
Frequency response using input and output parameters only.
What data are you starting with, and what do you want to do with them? If you want to identify the system, see the documentat...

3 years ago | 0

Answered
Plot data from txt file
If you simply want to aggregate the data in each second and plot them that way, try something like this — Uzp = unzip('Data 2....

3 years ago | 0

| accepted

Answered
How to change a variable name without changing the value itself?
Save them as elements of a cell array instead, when you first create them.

3 years ago | 2

Answered
How can I distinguish from an unfiltered signal an eeg signal from an emg one?
Plotting is straightforward — LD = load('sigtest230504.mat'); s = LD.sig; L = numel(s); Fs = 1E+3; t = linspace(0, L-1, L)...

3 years ago | 0

| accepted

Answered
The FFT plot does not shows up, it is empty
Perhaps: data(isinf(data)) = NaN; data = fillmissing(data, 'linear'); since there may be a NaN or Inf value in ‘data’ that i...

3 years ago | 1

| accepted

Answered
Unable to solve the collocation equations -- a singular Jacobian encountered.
Your ‘odefcn’ has a divide-by-zero somewhere, since at x=0, ‘Y(2)’ is NaN, and setting ‘x’ to something greater than 0 ‘Y(2)’ is...

3 years ago | 0

| accepted

Answered
use readtable and wrong data
Perhaps: T = readtable('Predator_Setting.xlsx','Range','A1:B54', 'VariableNamingRule','preserve') Eartlier versions of readta...

3 years ago | 1

| accepted

Answered
Deleting spikes and reconstructing background noise
While it is possible to replace the spikes with broadband noise, here I just replaced them with a short sine segment — LD1 = l...

3 years ago | 0

| accepted

Answered
Extract values from a fig file?
Try this — F = openfig('Example.fig'); % Load File & Display Contents Ax = gca; ...

3 years ago | 0

| accepted

Answered
xticks and yticks with decimal exponents
Use the compose function to create a separate set of tick labels — % My attemot plot(10^(0):10^(3),10^(-8):10^(3)) set(gca, ...

3 years ago | 1

| accepted

Load more