Answered
Optimisation of a filter knowing input and output
The System identification Toolbox is dedicated to problems like this. See if the Signal Processing Toolbox invfreqz function ...

7 years ago | 0

Answered
How can I separate the two fprintf
Add a ‘\n’ newline character to the end of each line: fprintf('A new location was found.Enter an ID for it:''NE051\n'); ...

7 years ago | 1

| accepted

Answered
Velocity cumtrapz or gradient
The gradient function calculates the approximate numerical derivative of a vector, and the cumtrapz function calculates the appr...

7 years ago | 1

| accepted

Answered
How to do a nonlinear fit using least squares
This is actually a linear problem, so a linear approximation will estimate the parameters correctly: R = 8.314462; ...

7 years ago | 1

| accepted

Answered
Finding matrix values associated with plot point
One approach: A = rand(10,2); A(4,:) = [75 0.995]; Lrow = ismembertol(A, [75 0.995], 0.01, 'ByRows',1) RowNr = find(Lrow)...

7 years ago | 0

Answered
Unable to save data or continue through loop
I can’t run your code. However, since you are not defining the character array ‘Filenamesave’ as a cell array earlier in your c...

7 years ago | 0

| accepted

Answered
Calculate slope at specific time over many days using polyfit and for loop
You appear to be calculating them correctly, just not storing them correctly. For a linear fit, polyfit will produce a (1x2) ve...

7 years ago | 0

| accepted

Answered
unable to use Low pass filter on experimental data
When I substitute some vectors for the missing data, the posted code runs for me without error. The filter function should ta...

7 years ago | 0

| accepted

Answered
Isolating a single pulse by removing noise
Try this: A = dlmread('F0000CH1.csv',",",0,3); Time = 1e9.*A(:,1); Voltage = A(:,2); figure plot(Time,Voltage,'LineWidth...

7 years ago | 1

| accepted

Answered
How to change the time increment of a text file to make a new data set from an existing one?
Use interp1: A = [1.1 7 8 5 1.2 8 9 4 1.3 9 10 3 1.4 10 11 12 1.5 11 12 1]; NewCol1 = min(A(:,1)) :...

7 years ago | 0

| accepted

Answered
Grid of values spacing in logarithmic scale
I am not certain what you want. Try this: xv = logspace(-5, -1, 25); yv = linspace(0, 1, numel(xv)); figure semilogx(x...

7 years ago | 1

| accepted

Answered
How do I solve the inverse kinematics of a nonlinear differential equation?
You can use the techniques in: Parameter Estimation for a System of Differential Equations. You can likely optimise with respec...

7 years ago | 0

Answered
I have a *.wav file. How do I change the bit rate(bits per sample) of it?
The only way I am aware of to change the bit rate is to read the audio file using audioread, then write it with audiowrite using...

7 years ago | 0

| accepted

Answered
How can I graph exponential functions?
First, do not use the exponentiation operator here: y1 = (2*exp(-2*t)-7*exp(-2*t)+0.6)/(4*exp^(-2*t)); ...

7 years ago | 0

Answered
Plot 2D points in 3D space
Since your trajectory is defined by two vectors, if you want to plot it in 3D space, you need to provide another vector. The ea...

7 years ago | 0

Answered
How to get period and frequency components of a signal?
A one-sided Fourier transform is a bit easier to interpret: % Ex 1B % Load the file load("xp.dat"); f_s = 8192; %sample f...

7 years ago | 0

Answered
Error: Index in position 1 is invalid. Array indices must be positive integers or logical values.
The problem is that ‘i’ and ‘j’ are initially both 0. I also did what I could to speed up your code, although it is still ext...

7 years ago | 1

| accepted

Answered
Array indices must be positive integers or logical values.
The code you posted runs for me without error. What line is throwing the error when you run it?

7 years ago | 1

| accepted

Answered
Designing a differentiator filter using cfirpm
The moving average filter is easy enough to design: Fs = 250; % Sampling Frequency (Hz) ...

7 years ago | 0

| accepted

Answered
Display time on x axis
It depends on what options you have. For datetime arrays, see Plot Dates and Durations. If you are using datenum date numb...

7 years ago | 0

| accepted

Answered
getting the max and its positions from a 4D array
Try this: A = rand(3,3,3,3); % Create Array Amax = max(A(:)); ...

7 years ago | 2

Answered
How to normalize two waves on a single plot
Try this: t=0:0.001:0.05; y= 11.18*cos(60*pi*t+26.565); y2= -60*pi*11.18*sin(60*pi*t+26.565); title('Phasor Waveforms') ...

7 years ago | 1

| accepted

Answered
How can I combine multiple wav files into a single new wav file
Use audioread to read them, then vertically concatenate them (assuming they all have the same numbers of channels=columns) using...

7 years ago | 0

Answered
how to plot empirical cdf in matlab release 2013a
One approach: x = randn(100,1); % Create Data binrng = linspace(-5, 5, 26); ...

7 years ago | 0

| accepted

Answered
finding real roots of polynomials
With only symbolic variables, it is not possible to determine if any of the roots are complex, unless one or more of the variabl...

7 years ago | 0

Answered
How to calculate the rate using a given data set?
You are not coding your differential equations and data correctly. See for example: Parameter Estimation for a System of Differ...

7 years ago | 0

| accepted

Answered
convert time to frequency domain
To normalise it to a maximum value of 1, divide the Fourier transformed data by the maximum of the Fourier transformed data: D...

7 years ago | 0

| accepted

Answered
stem3- different stem color and marker color for different values in an axis.
Two options: x = (ones(50,1)*(1:4))'; % Create Data y = ones(size(x,1),1)*(1:50); ...

7 years ago | 0

| accepted

Answered
non-zero threshold for event function
I am not certain what you are doing. If you want to evaluate ‘z’ as numeric rather than logical, just do an arithmetic operatio...

7 years ago | 0

| accepted

Answered
Please help me solve this second order ODE
Now that you have explained what ‘sat’ is, you posted two different Questions (this one and Help me solve this second order ODE ...

7 years ago | 0

Load more