Answered
How can I plot this function containing definite integral?
If you are integrating both with respect to ‘alpha’ (since the variable of integration of the second integral is not visible, al...

8 years ago | 0

| accepted

Answered
How to replace findpeaks() with another function
If the MATLAB version is *|R2017b|* or later, the <https://www.mathworks.com/help/matlab/ref/islocalmax.html *|islocalmax|*> (li...

8 years ago | 2

Answered
Using int for fun.
You are close to solving it. You need to express *|‘q’|* as an anonymous function of *|‘w’|*, then evaluate that function over ...

8 years ago | 1

| accepted

Answered
generate a bandpass signal
If you have *|R2018a|* (or later) use the <https://www.mathworks.com/help/signal/ref/bandpass.html *|bandpass|*> (link) function...

8 years ago | 0

Answered
How can i solve equation with integral and unknown?
I have no idea what you are doing. This runs: [kb, T, Nc, Nd, Ec, Ed] = deal(3,5,7,11,13,17); ...

8 years ago | 0

Answered
How do I repeat a function on each and every column of a 241X1236 array?
I would save them in a cell array: cwtc = cell(size(All_mean,2),1); % Preallocate Ce...

8 years ago | 1

| accepted

Answered
Hello, I am trying to solve an equation involving two vectors.
No need for the loop. Just use the <https://www.mathworks.com/help/matlab/ref/mrdivide.html *|mrdivide,/|*> (link) function: ...

8 years ago | 0

| accepted

Answered
How to check that two column vectors are multiple of each other?
One option is to concatenate them and then use the *|rank|* function to check to see if they are linearly dependent. For th...

8 years ago | 0

| accepted

Answered
cutting up the signal into repeating parts
I seem to have seen this waveform somewhere else recently! Try this: D = xlsread('Star11.xls'); tv = D(:,1); ap...

8 years ago | 4

| accepted

Answered
Z-Transform of difference Equation
Use the <https://www.mathworks.com/help/symbolic/subs.html *|subs|*> (link) function: X = subs(X, {ztrans(y(n), n, z), y(-...

8 years ago | 0

| accepted

Answered
Find Max for Every Category
Try this: A = [1 12; 1 16; 2 5; 2 13; 3 9; 3 19; 3 50]; Au = unique(A(:,1)); B = [Au accumarray(A(:,1), A(:,2), [], ...

8 years ago | 0

| accepted

Answered
multiple boxplots in one figure
Try this: a = randn(1,31); b = randn(1,31)*2 + 2; c = randn(1,31)/2 + 3; figure(1) boxplot([a(:) b(:) c(:)...

8 years ago | 2

Answered
Hello, if someone could please help. I was instructed to plot this data as a series of data points and not a solid line.
Include a marker argument to *|plot|*: plot(accel, '.'); although if *|‘t’|* and *|‘accel’|* are the same size, this wo...

8 years ago | 0

| accepted

Answered
How can i represent 2 functions on the same graph?
One option is the <https://www.mathworks.com/help/matlab/ref/fimplicit.html *|fimplicit|*> (link) function: f1 = @(x,y) 2*...

8 years ago | 0

| accepted

Answered
Can we make the for loop a feedback loop that stops at a certain value?
For the range, an <https://www.mathworks.com/help/matlab/ref/if.html *|if|*> (link) block would work. To stop the loop, use...

8 years ago | 0

| accepted

Answered
Error in using fitlnm: Why do I get "The model function must accept two arguments"?
The function must express the model you are fitting in terms of a vector of parameters and the independent variable, with the pa...

8 years ago | 0

| accepted

Answered
output filter from bandpass function
The *|filter|* function will only return the same result as *|‘y’|* (or *|‘y1’|*) for linear-phase *|FIR|* filters such as those...

8 years ago | 2

| accepted

Answered
How to create a horizontal histfit plot?
Try this: h = histfit(data); h(1).Horizontal = 'on'; Hy = h(2).XData; Hx = h(2).YData; h(2).Visible = 'off'; ...

8 years ago | 0

Answered
How to Correct the baseline shift of the signal
I always use discrete filters to eliminate baseline drift, baseline offset, and high-frequency noise. Try this: [D,S]...

8 years ago | 4

| accepted

Answered
Cheb2ord bandpass order.
Other than purely real poles an zeros (that exist on the *|‘jw=0’|* or ‘real’ axis), poles and zeros exist as complex conjugate ...

8 years ago | 0

Answered
Webcam cannot be disconnected
Try the function version: clear('camera') That is in the documentation as step *8* in: <https://www.mathworks.com/help/...

8 years ago | 0

Answered
How to plot overlapping lines while esnuring both remain visible?
I would plot ‘pipe 3’ (or whatever one is plotted later) with a larger line width, or plot ‘pipe 2’ (if plotted first) as a soli...

8 years ago | 0

| accepted

Answered
Writing vectors for exponetial equation
Your model is nonlinear, not linear, so you cannot use the *|mldivide,\|* function or operator with it. (It is nonlinear becaus...

8 years ago | 0

| accepted

Answered
How can I plot a graph of a system of non-linear equations with a conditional function as a variable and initial conditions?
I would first define *|‘f(z)’|* as: f = @(z) 34.*(z>1) - 34.*(z<-1); then create a separate anonymous function for the ...

8 years ago | 1

| accepted

Answered
Extracting the data after the threshold point
If I understand correctly what you want to do, this will work: Capacity_Thresh = Capacity(Capacity <= 1.4); NrCycles_Th...

8 years ago | 1

| accepted

Answered
Defining a projection function
Try this: test2 = @(C) test(1,10,C)

8 years ago | 0

| accepted

Answered
Surface fit to determine the coefficients of a hypothetical equation
The easiest way to approach this is to create a separate matrix from *|‘B’|* and *|‘f’|*, then pass that as your independent var...

8 years ago | 0

Answered
Sine curve for a given period value.
See for example: <http://www.mathworks.com/matlabcentral/answers/121579-curve-fitting-to-a-sinusoidal-function *Curve fitting to...

8 years ago | 0

| accepted

Answered
How to bin data into intervals?
I would do this: D = randi(1300, 1, 250); % Create Data hc = histcounts(D, [50 400 1000 1200...

8 years ago | 0

| accepted

Answered
Filling Matrix with varying random numbers
Considering the constraints (that it has to be a random integer less that or equal to the corresponding element of *|‘M’|*), a s...

8 years ago | 0

| accepted

Load more