Answered
Transfer function from measured input signal and output signal
The sampling interval ‘Ts’ is enough. Note that all your data must be sampled all with the same sampling interval. If they are...

7 years ago | 0

| accepted

Answered
Display only positive values
Yolu can simply use logical indexing for this, find is not absolutely necessary. However, if you want to use find, assign its...

7 years ago | 0

| accepted

Answered
Giving a bin width to imported data
It depends on what you want, and what function you are using. For the histcounts function and its friends, defining the edges a...

7 years ago | 0

| accepted

Answered
Normalize different size arrays to all be 100 points long with resample
Using resample (or any other interpolation method, although resample is best for signal processing applications) to get the same...

7 years ago | 0

| accepted

Answered
Raman spectra background removal
The ‘baseline’ of your data appears to be something resembling a logistic curve, although perhaps reversed. You will likely hav...

7 years ago | 0

| accepted

Answered
Finding several local maximum values in a given range and corresponding indices
Use the Signal Processing Toolbox findpeaks function, or the islocalmax (R2017b and later) function.

7 years ago | 1

| accepted

Answered
I have a signal with many frequencies. how to remove particular frequencies from it
Use the lowpass function (R2018a and later).

7 years ago | 0

Answered
Sum of alternating series
Just create the series and use the sum function: N = 1003; frc = (1./(1:2:N)); exv = (-1).^(0:numel(frc)-1); ser = frc.*exv...

7 years ago | 0

| accepted

Answered
How do I solve this system of equations for real number?
You have not assigned numeric values to ‘x’, ‘y’, and ‘z’, so what you currently have is the best you can do.

7 years ago | 0

| accepted

Answered
I am trying to plot this but nothing shows
My version of MATLAB will not run imiages of code, only actual code. My guess is that since you did not declare ‘i’ as a vari...

7 years ago | 0

Answered
Need help generating GA population
Try this: InitPop = randi([0 1], k, Nt); InitPop(InitPop == 1) = randi([1 15], 1, nnz(InitPop)); This initially creates ‘Ini...

7 years ago | 1

| accepted

Answered
Log Return "Undefined function 'log' for input arguments of type 'table'
Use varfun: T = array2table(randn(5)); % Create Table With Positive & Negative Values LT = varfun(@l...

7 years ago | 0

Answered
Upsampling the data using interpolation gives NaN values.
Use the 'extrap' argument in interp1. Example — D = load('x.mat'); x = D.x; v = 1:numel(x); ve = 1:2225570; x_extende...

7 years ago | 2

| accepted

Answered
what does ismember actually mean?
If I understand your Question correctly, the logical vector created by ismember will be in the order the elements appear in ‘res...

7 years ago | 0

| accepted

Answered
Calculate mean of certain values in a vector
You created a logical vector with ‘OnlyPositives’. Use it to calculate the mean as: avgProfitNoLoss = mean(profit(OnlyPositiv...

7 years ago | 0

| accepted

Answered
How to get "fundamental" from snr
The fundamental frequency is there, however it’s necessary to dig for it. I can’t test this with your data, however it works ...

7 years ago | 0

| accepted

Answered
Change specific values in odd/even columns of a matrix
Try this: A = [5 4 5 5 5 1 5 3 1 2 1 5 5 3 5 1]; L = A ==...

7 years ago | 1

| accepted

Answered
how to design a lowpass filter for a audio signa
If you have R21018a or later, use the lowpass function. (Also see the links in and at the end of that documentation page.) I...

7 years ago | 0

| accepted

Answered
System Identification toolbox - Double precision
I am not certain what your data are to begin with. However using the double function might be worth experimenting with.

7 years ago | 0

| accepted

Answered
Using subs function on a syms matrix
Assign it to ‘t’: syms t1 t2 t3 t = [t1 t2 t3]; %t1 t2 and t3 are syms variables t = subs(t,[t1 t2 t3],[0 0 45]) producing...

7 years ago | 0

| accepted

Answered
Use integral of function in bin instead of value at bin centre for histogram fit
See if the fitdist function will do what you want.

7 years ago | 0

Answered
How to optimise this equation?
Sinc you are using the factorial function, you are limited to integer values for ‘n’. Try this: objfcn = @(n,t,tau) (n.^n ....

7 years ago | 0

| accepted

Answered
fitting a scatter plot to power law
One approach: objfcn = @(b,x) b(1).*x.^b(3) + b(2).*x.^b(4); x = 1:10; ...

7 years ago | 0

| accepted

Answered
How do you plot something inbetween 1≤x≤e
Not certain what you want. Using xlim is one options.

7 years ago | 0

Answered
how to use table2timetable from a cvs file
It would be best to read it using readtable. Assuming that you did not do that and read it in as a matrix, this may do what y...

7 years ago | 0

Answered
I cannot create a table using matlab's documentation example
That runs for me without error. Check to see if you have a variable called ‘table’: which table -all the only results shou...

7 years ago | 1

| accepted

Answered
How to plot result from fitnlm?
One way is to get the estimated parameters, then plug them into your ‘model’ function: model = @(b,time) b(1)*(exp(-time./b(2)...

7 years ago | 0

Answered
ode15s error line 150
The problem is ‘ydot’. It must be a column vector, and the spaces are causing MATLAB to consider it a matrix. The easiest way ...

7 years ago | 0

| accepted

Answered
Find inverse of a cdf so as to sample x
As I suggested earlier in find finverse of cumtrapz(): If you want to use cumtrapz, the interp1 function is likely the best op...

7 years ago | 0

| accepted

Answered
Undefined function or variable using ODE45
I believe this is what you actually intend: function dy = fun(T,Y) FT0 = 42; FA0=10; %mol/min W=100; %KG a=.008; %kg^-1 k...

7 years ago | 0

| accepted

Load more