已回答
write a three_max function
There are several issues with your code. It does not return an output. It overloads the max() function, which can lead to conf...

6 years 前 | 0

| 已接受

已回答
Low Pass filter not working
You show a figure that essentially looks like the following (also attached): fs = 1000; t = 0:1/fs:10; x = sin(2*pi*10*t); X...

6 years 前 | 0

已回答
regexprep does not exactly what I want
There's definitely a way to do it using regexprep, but I found this solution first, so hopefully it is sufficient. Charge =...

6 years 前 | 0

| 已接受

已回答
Remove spikes from a matrix.
My version of nanmean only goes up to line 22 in R2019a, so I'm not sure what you have. Perhaps someone has written an overloade...

6 years 前 | 1

| 已接受

已回答
Audio sounds similar in volume before and after filtration of the most energetic frequency band
This has been solved. The answer was poor speakers and human threshold of hearing stow frequencies (as per the comments above).

6 years 前 | 0

已回答
identifying the continuous sweep's envelope
I've had success using *PaddedHilbert* on the file exchange in the past. <https://www.mathworks.com/matlabcentral/fileexchange/...

6 years 前 | 0

已回答
calculating residual between two time domain signals
It's unclear what you're trying to achieve, but yes that how to calculate the residuals (the difference between the observed val...

6 years 前 | 1

| 已接受

已回答
incorrect result of fft phase calculation
I made only a few changes to your code and got satisfactory results. Nfft = length(Yin); The zero padding was doing odd things ...

6 years 前 | 0

已回答
Signal filtering, smoothing and delay
I created a butterworth filter using filterDesigner, with the following parameters: Bandpass, IIR - Butterworth, specify order: ...

6 years 前 | 0

| 已接受

已回答
Find and count how many capital characters are in str, and then change them to lower cases USING LOOPS
s = 'This is my String with CapiTal LETTERS in it. Let''s change them to lowercase uSiNg LoOpS.' [caps,inds] = regexp(s,'...

6 years 前 | 0

已回答
Count how many ‘a’ are in str and eliminate those ‘a’
s = 'I have an apple'; [a,b] = regexp(s,'a','split'); numA = length(b); sentenceWithoutA = strjoin(a);

6 years 前 | 0

已回答
Extracting selected parts from text - regular expressions
This will remove a space followed by any numbers followed by a dot follow by another number. regexprep(myText,' [0-9]*.[0-9...

6 years 前 | 0

| 已接受

已回答
How can I use conditional operators to improve my code?
N = [1:n]; s = [N;N;factorial(N)]; fprintf('For N = %d, %d! = %d\n',s);

6 years 前 | 0

| 已接受

已回答
signum fuction with multiple input variables
If the set of v are the same size, then y = sign([v1,v2,v3]);

6 years 前 | 0

| 已接受

已回答
how to sum data with condition
This is silly. But not difficult to implement. x = [1 100; 1 101 ; 1 102; 2 109 ; 2 116 ; 2 118 ; 2 120 ; 3 103; 3 106]; y = x...

6 years 前 | 0

已回答
How do I break the line for every 50th row in a matrix
Fairly simple. Just need to reshape the variables. Here is an example: d = 10; x = repmat(1:d,1,d)'; y = [sin(x)]; t = 1:len...

6 years 前 | 0

已回答
Index 2D matrix along line rotated about the matrix midpoint
360/(N-1) doesn't make sense. What if N = 8? I think you just mean 180. But it's irrelevant. It would not be efficient to recrea...

6 years 前 | 0

已回答
Why can't I solve this, it's simple. (Incorrect dimensions.... use .^) (I did then it says Invalid Operator.......)
This works fine: z = ((x+1).^y)-(x.^y); You should read a bit on the difference between array and matrix operations. https://...

6 years 前 | 0

| 已接受

已回答
incorrect result of fft phase calculation
There are two issues at play. The first is a trade-off between temporal resolution and spectral resolution. Your sampling freque...

6 years 前 | 0

已回答
How to correct error in port width or dimension in simulink?
Reshape the signal going into 'ref' with a Reshape block, and select column vector as the output dimensionality.

6 years 前 | 0

已回答
Function for even or odd numbers
function y = iseven(v) y = all(~mod(v,2)); end

6 years 前 | 0

已回答
List comprehension-like function in assigning values in nested structures
You'll find the answer in this article on comma-separated lists, specifically with the _deal()_ function. <https://www.mathwork...

6 years 前 | 1

已回答
How to stop for-loop outside of the loop?
Sounds like you want a GUI of a stop watch. https://www.mathworks.com/matlabcentral/fileexchange/12628-stopwatch

6 years 前 | 0

| 已接受

已回答
Multiple Summation of Series using For Loops
Very close. You need to reset the value of s for each y. I also cleaned it up a bit. This now produces the specified figure. c...

6 years 前 | 0

| 已接受

已回答
how i implement this equation.
Why do you want a loop to do this simple equation anyways? Ok here you go... clearvars; Ne = 9; Ni = 100; Eci = rand(Ni,Ne);...

6 years 前 | 0

| 已接受

已回答
Error using odearguments (line 113) Inputs must be floats, namely single or double.
Your function dynamics takes as inputs x and y, but instead uses t and y. So fix that. You are also passing in a symbolic value...

6 years 前 | 0

已回答
Find the two nearest points from an array given a value
[~,k] = mink(abs(A-0.1400),2);

6 years 前 | 4

| 已接受

已回答
How to filter data using rmoutliers?
If you have a hard threshold you want to use, then rmoutliers is not the function you want. Just use a simple logical index to g...

6 years 前 | 1

已回答
Calculate the FFT of an ECG signal
I haven't ran your code but the plot looks pretty normal. The peak you see around 0 Hz is a DC component added to your signal. Y...

6 years 前 | 1

| 已接受

已回答
How vectorize this operation
If you have the signal toolbox, you can use the buffer() command to an array of the x values that you require, then do the matri...

6 years 前 | 0

加载更多