Respondida
calculate snr of digital signal
This is not correct. The second input to snr must be a real-valued row or column vector that must have the same dimensions as th...

más de 4 años hace | 0

Respondida
DTMF decoder .wav files code
It's a problem with your window size. Like I mentioned in a previous iteration of this question, you can look detect a proper wi...

más de 4 años hace | 1

Respondida
How do I generate a given Matrix in one command?
T = toeplitz([1 -1 0 0 0 0],[1 8 0 0 0 0])+diag(0:5)

más de 4 años hace | 0

Respondida
How to plot data with very small differences
You can try using *stem* or *scatter* or playing the *axis* limits. Or just plot the residuals, which is a pretty standard thing...

más de 4 años hace | 0

Respondida
Two outputs when calculating standard error of mean, WHY?
It's because size(A) returns two outputs. If you want to use the size of A in a particular dimension, use size(A,dim). (Since |s...

más de 4 años hace | 1

| aceptada

Respondida
3d Plotting Using Meshgrid
Replace for i=1:1:length(n) for j=1:1:length(m) [X,Y]=meshgrid(i,j); %disp(f(X,Y)); mesh...

más de 4 años hace | 1

| aceptada

Respondida
Switch the x axis direction where positive values are on the left side of the y axis
figure plot(1:10) set(gca,'XDir','reverse')

más de 4 años hace | 0

Respondida
how do I re-sample a continuous function; but maintain shape?
You can unaccept the answer if you want to keep it open, but also consider this answer. (For 3, I meant you're measuring from r...

más de 4 años hace | 1

Respondida
How do I organize repetitive values within a vector into a new vector that only has one of every repetitive value?
Your title and your description ask two very different questions. Your description is basically how to use XTick and XTickLabel ...

más de 4 años hace | 1

Respondida
Printing .m to pdf on Linux
publish('myscript.m','pdf'); It will publish any figure or anything that prints to the command line as well.

más de 4 años hace | 0

Respondida
how do I re-sample a continuous function; but maintain shape?
I see several potential reasons why this is occuring. 1) There will be general broadening of the signal due to downsampling. 2...

más de 4 años hace | 1

| aceptada

Respondida
Random number, Random integer
x = 2:6; y = x(randperm(length(x),2));

más de 4 años hace | 1

| aceptada

Respondida
mscohere function (equations used for it)
You can view the code by typing into the command window open mscohere % then subsequently open welch and follow along. You c...

más de 4 años hace | 1

Respondida
improving result of FFT
You'll want to use it as the second input to the fft. This will affect your frequency vector |fvec| though. n = 2^nextpow2(...

más de 4 años hace | 0

Respondida
What can I know from the spectrogram of mp3 and wav file
It's difficult to say given that they are plotted with two different colorbar axes limits. Set them to be the same and you can v...

más de 4 años hace | 0

Respondida
FFT size. Determine K so that K is a power of two
If you sampling frequency is 4000 Hz, then to get a resolution of 20 Hz you need to take an N-point fft, where N = 4000/20 = 200...

más de 4 años hace | 2

Respondida
How to get rid of ringing/overshoot in an ecg signal while using notch filter?
clearvars clc close all fs = 500; ecg = xlsread('Noisy_50HZ_ECG.xlsx'); ecg = detrend(ecg.'); ecg = sgolayfilt(ecg,0,5...

más de 4 años hace | 1

| aceptada

Respondida
Multiple Summation of Series using For Loops (Magnetic Flux through Coil Simulation)
Hi Samuel, I don't see anything wrong with the code. The only thing I would change is to do the following outside the loops: ...

más de 4 años hace | 1

| aceptada

Respondida
How to Take Inverse Fourier Transform?
You have essentially done this: Y1 = fftshift(fft(h38)); Y1 = abs(Y1); P1 = Y1; iP1 = ifft(P1); Of course iP...

más de 4 años hace | 0

| aceptada

Respondida
collapsing redundant entries in MATLAB table
Use |groupsummary|: <https://www.mathworks.com/help/matlab/ref/double.groupsummary.html>

más de 4 años hace | 1

| aceptada

Respondida
How to take gradient, curl or divergence of numeric vector fields?
You can use the |curl| and |divergence| functions which are not in the symbolic toolbox: <https://www.mathworks.com/help/matl...

más de 4 años hace | 0

Respondida
Random number multiple of 5 generation
First find out how many possibilities there are: interMin = 20; interMax = 150; n = sum(~mod(interMin:interMax,5)); % n = 27...

más de 4 años hace | 0

Respondida
Why won't my graph plot?
It did plot. Try this: plot(FS,d,'bo') It's just that FS and d only contain 1 element. You need to understand how to store da...

más de 4 años hace | 0

Respondida
How would you approach this problem?
I don't understand the second truth table, but the first one can be done as follows: actual = [0;0;1;1]; next = [0;1;0;1]; ...

más de 4 años hace | 1

| aceptada

Respondida
How can I combine complex spectrogram results as an image for multi-channel EEG signal?
It usually takes a lot of work to get a figure to look just right. Here is what I came up with quickly, you can play around with...

más de 4 años hace | 2

Respondida
How can I combine complex spectrogram results as an image for multi-channel EEG signal?
Take all your outputs from spectrogram, and assuming they are all sampled at the same time/freqs, just stack them (concatenate) ...

más de 4 años hace | 2

Respondida
How to use the result of my matrix calculation to create 2D plot
l1,l2, and Z are all a single value. You need to understand how to store values in a for loop: https://www.mathworks.com/help/m...

más de 4 años hace | 0

| aceptada

Respondida
time domain and frequency domain
Code looks fine to me. Not sure what you mean by N being 2^N. The only thing I would tweak is setting tvec = (0:N-1)*delt; As...

más de 4 años hace | 0

Respondida
extract data with unique ID
As Walter also suggested: [~,~,locGroups] = unique(subs(:,1)); % also look at [~,~,locGroups] = unique(subs(:,1),'stable'); ...

más de 4 años hace | 0

| aceptada

Respondida
how to handle this issue "Error using regexprep"
% Assuming this is what you have... labels = {{["usm1" ]} ,{["usm2" ]},{["usm3" ]},{["usm4" ]},... {["owrl1"]},{["owrl2"]}...

más de 4 años hace | 0

| aceptada

Cargar más