Answered
Stopband filter with multiple stopbands
This is a relatively straightforward problem. Example — Fs = 250; fcomb = [[49 49.5 50.5 51], [49 49.5 50.5 51]+10, [49 49...

5 years ago | 0

| accepted

Answered
High pass filter for the values
‘I want to have a high pass filter such that values above zero remain, and the amplitudes of the negative values are somehow red...

5 years ago | 0

| accepted

Answered
Count unique combinations of elements in a 3D matrix
The only way I can see to do this is first to reshape ‘A’ and then use the unique function on the resulting rows, and do the cou...

5 years ago | 0

| accepted

Answered
How to create a loop between two sets of differential equations?
‘What type of loop would I use to model this?’ That depends on the result you want. If you only want to model it for a few ...

5 years ago | 1

| accepted

Answered
Convert CSV into Multiple 1-D Arrays
If you have R2013b or later, use the readtable funciton. It should do everything you want. You can create separate tables for ...

5 years ago | 0

| accepted

Answered
float point freezing matlab
I edited the functions to be anonymous functions so the code no longer takes forever. However, there are significant problems, ...

5 years ago | 0

Answered
What is the best way to count the occurrences of two table columns together?
Try this: A = {'A'; 'B'; 'C'; 'A'; 'C'; 'C'; 'B'}; B = {'x'; 'y'; 'z'; 'xx'; 'z'; 'z'; 'y'}; T = table(A,B); [Tu,~,ix] = ...

5 years ago | 0

| accepted

Answered
for Loop counting Array
I prefer using inputdlg for the inputs. Then see the documentation section on Matrix Indexing to understand how to create the v...

5 years ago | 0

Answered
FWHM of an averaging kernel line
See if this does what you want: y = linspace(0, 80, 250); x = sin(y-25)./(5*(y-25)); [xmax,idxx] = max(x); [xmin,idxn] ...

5 years ago | 0

| accepted

Answered
Summing integrands in a loop
The loop is not necessary. Try this: fun1 = @(x,k)(x.^k); k = 1:3; intv = integral(@(x)sum(fun1(x,k)), 0, 1, 'ArrayValu...

5 years ago | 0

| accepted

Answered
How can I calculate a Mass Center x,y,z and concentration matrix?
Something similar to a Weighted arithmetic mean could work. The weight value would be the ‘z’ variable.

5 years ago | 0

Answered
DC/offset value
‘how can i remove the dc value from the signal’ Subtract the mean of the signal from the signal: signal_0 = signal-mean(sign...

5 years ago | 0

Answered
How can I make multi parameters using syms, automatically?
One approach: For the (2x2) example: syms p P = sym('p%d', [2 2]) v = [1 2 3 4]; P = reshape(v,[],size(P,1)).'; and for...

5 years ago | 0

| accepted

Answered
Scatte plot to contour plot xyz data.
Several MATLAB plot types require the ‘Z’ argument to be a matrix. One way of creating it is to interpolate it, and one way o...

5 years ago | 1

Answered
How to plot shaded confidence interval?
Try this: D = load('TE_U.mat'); y = D.TE_U(:,1); L = D.TE_U(:,2); H = D.TE_U(:,3); %CI values x = (1:numel(y)).'-1; ...

5 years ago | 0

| accepted

Answered
Nonlinear fitting - No output function with MultiStart
Unfortunately, this: fitfcn = @(p, Vm, EGlu, EChl, dt, tmax) ((p(1)) .* ((1 - exp(-(0:dt:tmax-dt) / p(3))) .* exp(-(0:dt:tmax-...

5 years ago | 1

| accepted

Answered
How to calculate partial area-under-the-curve?
Use trapz twice, once to integrate (A, B, C), and again to integrate (A, C). Then subtract the (A, C) result from the (A, B, ...

5 years ago | 0

| accepted

Answered
lsqcurvefit with 3 xdata
I would do something like this: % % % ETo=rf(0.45t+8)(H-R^m)/100 % Original...

5 years ago | 0

| accepted

Answered
How to define and plot a function containing integrals?
‘... alpha and beta are arrays of floating point values that are functions of E ...’ Having expressions for them is important...

5 years ago | 0

Answered
Plot histogram values and ranges
The histogram function allows you to specify whatever bin edges you want. See Specify Bin Edges of Histogram for details.

5 years ago | 0

Answered
appearing of unregular numbers
That appears to be from the Symbolic Math Toolbox. Using the vpa function should result in decimal numbers.

5 years ago | 0

Answered
Passband ripple and stopband attenuation
Passband ripple (derived from elliptic and Chebychev filters and not strictily applicable to all filter designs, such as Butterw...

5 years ago | 0

| accepted

Answered
how to apply wavelet denosing method on given data
See the documentation section on Denoising in the Wavelet Toolbox.

5 years ago | 0

Answered
Line of code wont read
It actually needed two multiplication operators, then the parenthesis problem was easy to solve. See if this does what you wa...

5 years ago | 1

| accepted

Answered
Using fminsearch to determine variables
The fminsearch function (and all other optimization functions I know of) want a scalar result from the function they are optimis...

5 years ago | 0

Answered
GA Optimization terminated without converging
‘Can anyone tell me how I can solve this problem?’ Not definitively. I assume you are referring to the ga function in the ...

5 years ago | 0

Answered
Array indices must be positive integers or logical values.
Not able to run the posted code: Unrecognized function or variable 'R_2'. That aside, be absolutely certain that you have not...

5 years ago | 0

Answered
How to cycle through a vector to create a matrix?
I am not certain what result you want. Try this: syms a b c d N = 10-4; Av = [a b c d 0 0 0 0 0 0]; for k = 0:N A(...

5 years ago | 0

| accepted

Answered
Plot Error Please help
It’s necessary to account for absolutely all possibilities. Try this: theta = linspace(0,2*pi,500); for i=1:numel(theta) ...

5 years ago | 0

| accepted

Answered
How to automatically chop up signal??
It depends on where you define ‘start’ and ‘end’. If you want to consider the middle of the signal rather tha either peak, fi...

5 years ago | 0

| accepted

Load more