Answered
Estimating a transfer function with a given Bode csv data file
Thje input is preferred, however not required. See: iddata, idfrd and related functions, and go from there.

3 years ago | 0

| accepted

Answered
how to smooth or filter the signal like this?
I saved that code. I did not save the non-code text that went with it. I am not certain that I can reproduce the image that ...

3 years ago | 0

Answered
Extract signal values from a data file
I am not certain what ‘identify and match’ means. It is certainly possible to filter the 40 and 75 Hz frequencies individually,...

3 years ago | 0

| accepted

Answered
Obtain the desired orientation without reversing the direction of the two axes
Try something like this — data = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1236147/data.txt')...

3 years ago | 0

| accepted

Answered
How do you do a sine transform in Matlab?
In general, a Fourier transform is defined as: where: and its inverse: since apparently is in Hz (or at least not a...

3 years ago | 0

| accepted

Answered
How can convert line plot to bar plot
I have no idea what you want to do. Perhaps something like this — nodeSize=[50 100]; x = rand(3,2); figure hb = bar(x,...

3 years ago | 0

| accepted

Answered
How to determine and adjust the x axis after taking the 1D FFT?
I usually do something like this — t = linspace(0, 100, 10000); % Time Vector s = sum(sin([1...

3 years ago | 0

| accepted

Answered
how to resume GA with saved output in script file
For future reference, consider the approach in How to save data from Genetic Algorithm in case MATLAB crashes? - MATLAB Answers ...

3 years ago | 0

Answered
How to Determine the Cutoff Frequency of Butterworth Low-Pass Filter When Filtering an EMG Signal ?
Use the fft or pspectrum functions to calculate the Fourier transform of the EMG data. Use that result to define the frequencie...

3 years ago | 0

| accepted

Answered
How to determine phase angle of an AC voltage?
Note that ‘v’ is a function of two variables, ‘w’ (that I assume is radian frequency) and ‘t’ (obviously time). The result is a...

3 years ago | 0

Answered
How do I use MatLab to find a line of best fit with a predetermined y intercept using regression.
Perhaps — x = 0:250; y = randn(size(x)); B0 = x(:) \ (y(:)-1) fitline = x(:) * B0 + 1; figure plot(x, y, '.') hold o...

3 years ago | 0

| accepted

Answered
The cutoff frequencies must be within the interval of (0,1).
‘The cutoff frequencies must be within the interval of (0,1).’ Divide ‘fp’ and ‘fs’ by the Nyquist frequency ‘fn’, one-half the...

3 years ago | 0

Answered
How a bandpass filter (BP) can be made
Since you apparently are supposed to code it using command-line function calls in a script, and you are limited to an order 5 fi...

3 years ago | 1

Answered
first order differential equation
One approach — syms y(x) x Y Dy = diff(y); Eqn = 2*x*y*Dy+(1+x)*y^2 == exp(x); [VF,Subs] = odeToVectorField(Eqn) odefcn =...

3 years ago | 0

Answered
remove noise from signal
Change: [b,a] = butter(n,Wn); to: [z,p,k] = butter(n,Wn); and eliminate the tf2zp call. Then the filtfilt call should be...

3 years ago | 0

| accepted

Answered
How to plot u(t) - u(t-2) on matlab
If ‘u(t)’ is the unit step (heaviside) function — syms t u(t) = heaviside(t); figure fplot(u(t)-u(t-2), [0 5]) grid xl...

3 years ago | 1

Answered
Optimisation of parameters in coupled ODE
I’m not certain what you’re doing (and 81 parameters seems excessive), however this is the approach I use with ga to solve kinet...

3 years ago | 0

Answered
str2double function multiplies values by 10e12, 10e13 and 10e14 randomly.
Try ssomething like this — data1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1233477/example...

3 years ago | 0

| accepted

Answered
Setting length of output vector for ode45
Choose a vector with more than two elements for ‘tspan’ for example — tspan = linspace(min(time), max(time), N); where ‘time’...

3 years ago | 1

| accepted

Answered
Fix the code calculate PSD
I am not certain what you are doing. The third argument to cpsd is supposed to be a window function, however in your calls to i...

3 years ago | 0

Answered
how to use dataaspectratio in scatterplot?
I doubt that daspect is going to have any effect here. The only option is likely to translate one of the plots by subtracting t...

3 years ago | 0

| accepted

Answered
How to compute number of bit change among consecutive binary numbers?
Use pdist with the 'hamming' distance metric then squareform to create the matrix — b = {'110' '101' '011' '111' '...

3 years ago | 0

Answered
Symbolic Toolbox Solving for Zeros
One approach — range = [-5 5]; syms x; f(x) = sin(3*x); z = dPlotInfo(f, range); disp(z); function [zeros] = dPlotInfo(...

3 years ago | 0

Answered
How do I right pad a numeric data field with invisible characters?
It would help to know more precisely what you want to do. Numeric format dexcriptors can be created as a total numeric field ...

3 years ago | 0

Answered
Differentiation question - How to find out H vs. dH/dt from a list of height and datetime series?
One approach — T = ['01-Jan-2003' '17-Jan-2003' '03-Feb-2003' '20-Feb-2003' '01-Mar-2003' '15-Mar-2003' '04-Apr-2003' '...

3 years ago | 0

| accepted

Answered
Bode plot, plotted with experimental data
If you want to identify a system from experimental data, use the System Identification Toolbox functions, starting with iddata, ...

3 years ago | 1

Answered
How can I delete last two colum in a matrix?
Try something like this — A = rand(7,5) Anew = A(:,1:end-2) .

3 years ago | 0

| accepted

Answered
how to extract y as a function of x
Try something like this — syms x y a b x0 y0 tr sympref('AbbreviateOutput',false); Eqn = (a^2*sin(tr)^2+b^2*cos(tr)^2)*(x-x0...

3 years ago | 0

| accepted

Answered
How to invoke and use GA tool in Matlab R2022b?
If you are doing parameter estimation, this approach will likely work — x = 1:0.1:10; y = 2.5*exp(-(x-5).^2/2)+randn(size(x))...

3 years ago | 0

| accepted

Answered
How to plot a line of zero value on a surface?
Use contour3 to draw the boundary (here a red line with 'LineWidth',5) — LD1 = load(websave('Y','https://www.mathworks.com/m...

3 years ago | 0

| accepted

Load more