Beantwortet
How to plot discrete array with colors
One approach — status = randi([0 1], 1, 9) % 'Waiting' = 0, 'Busy' = 1 status = flip(status...

etwa 3 Jahre vor | 0

Beantwortet
Adding error bars to a grouped bar plot
An example using properties available in prior and recent MATLAB releases is provided in Putting error bars on bar plot? One ...

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 2

| akzeptiert

Beantwortet
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.') ...

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 1

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

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 2

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

Mehr laden