Answered
Making an X ray image out of x, y, z coordinates ERROR
Ir may be necessary to add the name-value pair: 'EndOfLine','\r\n' to the textscan call, since otherwise textscan fails to re...

1 year ago | 0

Answered
ylabel changes position with ax.YAxisLocation = 'origin'
The axis labels are text objects with the same properties. (Although not all the properties, such as 'VerticalAlignment' are l...

1 year ago | 1

| accepted

Answered
How to do a cross-multiplication by group in a table
I am not certain what you want to do, however the fillmissing function can replace the NaN values in ‘d’ with the scalar 400. ...

1 year ago | 0

| accepted

Answered
How to upsample an ECG signal and its associated data?
Use the resample function to upsample it, since this function is specifically designed for signal processing, and contains an an...

1 year ago | 0

Answered
I am having trouble reading a txt file
You may need to specify the name-value pair: 'EndOfLine','\r\n' That has usually been the solution when I have encountered si...

1 year ago | 0

| accepted

Answered
How can I "connect" the colorbar to my values of a scatter plot?
I am not certain what you want to do, or what you intend by ‘connect’. One option — a = rand(1000,1); % C = 1-[a a a]; C ...

1 year ago | 1

| accepted

Answered
Assistance Needed to Determine Noise in ECG Dataset
It does not appear to be excessively noisy. There is some baseline variation, however this is not present in every lead and is ...

1 year ago | 0

| accepted

Answered
Import timestamps with alternating date formats
It does not actually appear to be alternating, although the trailing zeros on some may indicate that the time is not exactly tho...

2 years ago | 0

| accepted

Answered
How to find peaks in timeseries data?
Your code works when I run it, alhough not all ‘location_data’ vectors have identifiable peaks (all below the 'MinPeakHeight' va...

2 years ago | 0

Answered
Intersection of Discretized Curves
It would help to have the data. TThe approach to these problems is straightforward. In this instance, the independent variab...

2 years ago | 0

| accepted

Answered
Lowpass vs bandpass filtering
The functions may by default design a FIR filter, and FIR filters have problems with some signals, since the FIR filter order ma...

2 years ago | 1

| accepted

Answered
Plotting error bars on curve
I really can’t do anything without the data. The rest of the code (that imports the data and processes it including calculating...

2 years ago | 0

| accepted

Answered
3D Figure from Excel (x,y,z)
It always helps to have your data. A picture may be worth a thousand words, however on MATLAB Answers, data is worth a thousand...

2 years ago | 0

| accepted

Answered
MATLAB FFT bin size
I agree with @Steven Lord, however there are ways to do what you want with the MATLAB fft function. I wrote a small utility fun...

2 years ago | 1

| accepted

Answered
I would like to plot an interpolated 3d Surface between two faces, i.e. the third face of a truncated cone. my plot isn't working but I'm not sure what is wrong
TThis does not look like a cone to me at all. What do you want to do? r1=0.5; % t1=[(0:0.1:2*pi),0]; t1=0:0.1:2*pi; X1=...

2 years ago | 0

| accepted

Answered
Strange issue with mean, max, and min of vector?
See the plotted values — load('diffT.mat') whos('-file','diffT') % diffT neg_vals = nnz(diffT < 0) [lo,hi] = bounds(d...

2 years ago | 0

| accepted

Answered
How to iterate over data sets?
If you have the Signal Processing Toolbox, use the buffer function for this. dummy1 = (1:60).' bfr1 = buffer(dummy1, 12); ...

2 years ago | 0

Answered
File Issues after copying from another PC
The resample function is part of the Signal Processing Toolbox. You need to have the Toolbox licensed and installed before you ...

2 years ago | 1

| accepted

Answered
Removing outliers from the data creates gaps. Filling these gaps with missing values or the median of surrounding values does not address the issue.Why?
Your version/release is not stated, however beginning with R2017a, the filloutliers function has been available. Using the 'med...

2 years ago | 0

| accepted

Answered
How do I find the x and y coordinates of a fitted Gaussian curve at a given slope?
Once you have the equation for the gaussian, the rest is striaightforward. Find the midpoint in the mamplitude to determine th...

2 years ago | 0

Answered
Optimal Cutoff Frequency for Static Noise Detection in ECG Signals?
You have not defined ‘static noise’ so I have no idea what you’re actually filtering. The bandwidth of a normal EKG is genera...

2 years ago | 0

| accepted

Answered
How do I calculate the duration between two times?
This seems to work — load('results_start_array.mat') whos('-file','results_start_array.mat') load('results_start_end.mat')...

2 years ago | 0

| accepted

Answered
how to fill color in 1/4 th circle
A new function in R2024a is the polarregion function. Try this — figure thetas1 = [0.5 1]*pi; radii1 = [1 2]; polarregi...

2 years ago | 0

Answered
How to interpolate values given a starting and end point
Use the rescale function — Vrec = [18.2, 18.1, 18.0, 17.9]; Vrange = [50.6 50.3]; Vres = rescale(Vrec, Vrange(2), Vrange(1...

2 years ago | 0

| accepted

Answered
How can i make 3D graph with multiple 2D graphs?
If the vectors all have the same sizes, just plot them as a matrix using the surf function. t = linspace(0, 1, 25).'; ...

2 years ago | 2

| accepted

Answered
How to change the spectrogram magnitude to linear?
I susp[ect that you may actually want to use the pspectrum function with the 'spectrogram' type. To understand the differences ...

2 years ago | 0

Answered
Best analysis to show how EEG ranges are similar
I’m not certain what you actually want to do. I would be tempted to use Fourier transforms, specifically stft, and compare th...

2 years ago | 0

Answered
How to solve non_linear equation
Solve it symbolically — syms z Eqn = z^3 == log(z)*(482036/0.18525)^5 Z = solve(Eqn) Z = vpa(Z) format longG Zd = doub...

2 years ago | 0

| accepted

Answered
How to find the intersection of linear regression model and yline
Use the interp1 function for this — T(:,1) = [0 1 2 3 4 5].'; T(:,2) = [0 1 2 3 4 5].'; x = T(:,1); y = T(:,2); p = poly...

2 years ago | 0

| accepted

Answered
I am getting this warning "Matrix is singular to working precision." and my surf plot is not showing.
You need to do element-wise opeerations in your ‘u’ function, so: u = @(x,y)(-4*pi*exp(-5*pi*pi*0.5).*cos(2*pi*x).*sin(pi*y))....

2 years ago | 1

| accepted

Load more